<!DOCTYPE html>
<html lang="en">
<head profile="http://a9.com/-/spec/opensearch/1.1/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../assets/site.css" rel="stylesheet">
  <title>go/types</title>
  
    <meta name="twitter:title" content="Package types">
    <meta property="og:title" content="Package types">
    <meta name="description" content="Package types declares the data types and implements the algorithms for type-checking of Go packages.">
    <meta name="twitter:description" content="Package types declares the data types and implements the algorithms for type-checking of Go packages.">
    <meta property="og:description" content="Package types declares the data types and implements the algorithms for type-checking of Go packages.">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@golang">
  
  

  

</head>
<body>

<div class="container">

        <h2 id="pkg-overview">package types</h2>

        <p><code>import "go/types"</code>

        <p>
Package types declares the data types and implements
the algorithms for type-checking of Go packages. Use
Config.Check to invoke the type checker for a package.
Alternatively, create a new type checker with NewChecker
and invoke it incrementally by calling Checker.Files.
</p>
<p>
Type-checking consists of several interdependent phases:
</p>
<p>
Name resolution maps each identifier (ast.Ident) in the program to the
language object (Object) it denotes.
Use Info.{Defs,Uses,Implicits} for the results of name resolution.
</p>
<p>
Constant folding computes the exact constant value (constant.Value)
for every expression (ast.Expr) that is a compile-time constant.
Use Info.Types[expr].Value for the results of constant folding.
</p>
<p>
Type inference computes the type (Type) of every expression (ast.Expr)
and checks for compliance with the language specification.
Use Info.Types[expr].Type for the results of type inference.
</p>
<p>
For a tutorial, see <a href="https://github.com/golang/go/blob/master/s/types-tutorial">https://github.com/golang/go/blob/master/s/types-tutorial</a>.</p>


        
  


        
        <h3 id="pkg-index" class="section-header">Index <a class="permalink" href="#pkg-index">&para;</a></h3>

        

        <ul class="list-unstyled">
          
          <li><a href="#pkg-variables">Variables</a></li>
          <li><a href="#AssertableTo">func AssertableTo(V *Interface, T Type) bool</a></li><li><a href="#AssignableTo">func AssignableTo(V, T Type) bool</a></li><li><a href="#Comparable">func Comparable(T Type) bool</a></li><li><a href="#ConvertibleTo">func ConvertibleTo(V, T Type) bool</a></li><li><a href="#DefPredeclaredTestFuncs">func DefPredeclaredTestFuncs()</a></li><li><a href="#ExprString">func ExprString(x ast.Expr) string</a></li><li><a href="#Id">func Id(pkg *Package, name string) string</a></li><li><a href="#Identical">func Identical(x, y Type) bool</a></li><li><a href="#IdenticalIgnoreTags">func IdenticalIgnoreTags(x, y Type) bool</a></li><li><a href="#Implements">func Implements(V Type, T *Interface) bool</a></li><li><a href="#IsInterface">func IsInterface(typ Type) bool</a></li><li><a href="#ObjectString">func ObjectString(obj Object, qf Qualifier) string</a></li><li><a href="#SelectionString">func SelectionString(s *Selection, qf Qualifier) string</a></li><li><a href="#TypeString">func TypeString(typ Type, qf Qualifier) string</a></li><li><a href="#WriteExpr">func WriteExpr(buf *bytes.Buffer, x ast.Expr)</a></li><li><a href="#WriteSignature">func WriteSignature(buf *bytes.Buffer, sig *Signature, qf Qualifier)</a></li><li><a href="#WriteType">func WriteType(buf *bytes.Buffer, typ Type, qf Qualifier)</a></li>
          
            <li><a href="#Array">type Array</a></li>
            <ul>
            <li><a href="#NewArray">func NewArray(elem Type, len int64) *Array</a></li>
            <li><a href="#Array.Elem">func (a *Array) Elem() Type</a></li><li><a href="#Array.Len">func (a *Array) Len() int64</a></li><li><a href="#Array.String">func (t *Array) String() string</a></li><li><a href="#Array.Underlying">func (t *Array) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#Basic">type Basic</a></li>
            <ul>
            
            <li><a href="#Basic.Info">func (b *Basic) Info() BasicInfo</a></li><li><a href="#Basic.Kind">func (b *Basic) Kind() BasicKind</a></li><li><a href="#Basic.Name">func (b *Basic) Name() string</a></li><li><a href="#Basic.String">func (t *Basic) String() string</a></li><li><a href="#Basic.Underlying">func (t *Basic) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#BasicInfo">type BasicInfo</a></li>
            
            
            
            
          
            <li><a href="#BasicKind">type BasicKind</a></li>
            
            
            
            
          
            <li><a href="#Builtin">type Builtin</a></li>
            <ul>
            
            <li><a href="#Builtin.Exported">func (obj *Builtin) Exported() bool</a></li><li><a href="#Builtin.Id">func (obj *Builtin) Id() string</a></li><li><a href="#Builtin.Name">func (obj *Builtin) Name() string</a></li><li><a href="#Builtin.Parent">func (obj *Builtin) Parent() *Scope</a></li><li><a href="#Builtin.Pkg">func (obj *Builtin) Pkg() *Package</a></li><li><a href="#Builtin.Pos">func (obj *Builtin) Pos() token.Pos</a></li><li><a href="#Builtin.String">func (obj *Builtin) String() string</a></li><li><a href="#Builtin.Type">func (obj *Builtin) Type() Type</a></li>
            </ul>
          
            <li><a href="#Chan">type Chan</a></li>
            <ul>
            <li><a href="#NewChan">func NewChan(dir ChanDir, elem Type) *Chan</a></li>
            <li><a href="#Chan.Dir">func (c *Chan) Dir() ChanDir</a></li><li><a href="#Chan.Elem">func (c *Chan) Elem() Type</a></li><li><a href="#Chan.String">func (t *Chan) String() string</a></li><li><a href="#Chan.Underlying">func (t *Chan) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#ChanDir">type ChanDir</a></li>
            
            
            
            
          
            <li><a href="#Checker">type Checker</a></li>
            <ul>
            <li><a href="#NewChecker">func NewChecker(conf *Config, fset *token.FileSet, pkg *Package, info *Info) *Checker</a></li>
            <li><a href="#Checker.Files">func (check *Checker) Files(files []*ast.File) error</a></li>
            </ul>
          
            <li><a href="#Config">type Config</a></li>
            <ul>
            
            <li><a href="#Config.Check">func (conf *Config) Check(path string, fset *token.FileSet, files []*ast.File, info *Info) (*Package, error)</a></li>
            </ul>
          
            <li><a href="#Const">type Const</a></li>
            <ul>
            <li><a href="#NewConst">func NewConst(pos token.Pos, pkg *Package, name string, typ Type, val constant.Value) *Const</a></li>
            <li><a href="#Const.Exported">func (obj *Const) Exported() bool</a></li><li><a href="#Const.Id">func (obj *Const) Id() string</a></li><li><a href="#Const.Name">func (obj *Const) Name() string</a></li><li><a href="#Const.Parent">func (obj *Const) Parent() *Scope</a></li><li><a href="#Const.Pkg">func (obj *Const) Pkg() *Package</a></li><li><a href="#Const.Pos">func (obj *Const) Pos() token.Pos</a></li><li><a href="#Const.String">func (obj *Const) String() string</a></li><li><a href="#Const.Type">func (obj *Const) Type() Type</a></li><li><a href="#Const.Val">func (obj *Const) Val() constant.Value</a></li>
            </ul>
          
            <li><a href="#Error">type Error</a></li>
            <ul>
            
            <li><a href="#Error.Error">func (err Error) Error() string</a></li>
            </ul>
          
            <li><a href="#Func">type Func</a></li>
            <ul>
            <li><a href="#MissingMethod">func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool)</a></li><li><a href="#NewFunc">func NewFunc(pos token.Pos, pkg *Package, name string, sig *Signature) *Func</a></li>
            <li><a href="#Func.Exported">func (obj *Func) Exported() bool</a></li><li><a href="#Func.FullName">func (obj *Func) FullName() string</a></li><li><a href="#Func.Id">func (obj *Func) Id() string</a></li><li><a href="#Func.Name">func (obj *Func) Name() string</a></li><li><a href="#Func.Parent">func (obj *Func) Parent() *Scope</a></li><li><a href="#Func.Pkg">func (obj *Func) Pkg() *Package</a></li><li><a href="#Func.Pos">func (obj *Func) Pos() token.Pos</a></li><li><a href="#Func.Scope">func (obj *Func) Scope() *Scope</a></li><li><a href="#Func.String">func (obj *Func) String() string</a></li><li><a href="#Func.Type">func (obj *Func) Type() Type</a></li>
            </ul>
          
            <li><a href="#ImportMode">type ImportMode</a></li>
            
            
            
            
          
            <li><a href="#Importer">type Importer</a></li>
            
            
            
            
          
            <li><a href="#ImporterFrom">type ImporterFrom</a></li>
            
            
            
            
          
            <li><a href="#Info">type Info</a></li>
            <ul>
            
            <li><a href="#Info.ObjectOf">func (info *Info) ObjectOf(id *ast.Ident) Object</a></li><li><a href="#Info.TypeOf">func (info *Info) TypeOf(e ast.Expr) Type</a></li>
            </ul>
          
            <li><a href="#Initializer">type Initializer</a></li>
            <ul>
            
            <li><a href="#Initializer.String">func (init *Initializer) String() string</a></li>
            </ul>
          
            <li><a href="#Interface">type Interface</a></li>
            <ul>
            <li><a href="#NewInterface">func NewInterface(methods []*Func, embeddeds []*Named) *Interface</a></li>
            <li><a href="#Interface.Complete">func (t *Interface) Complete() *Interface</a></li><li><a href="#Interface.Embedded">func (t *Interface) Embedded(i int) *Named</a></li><li><a href="#Interface.Empty">func (t *Interface) Empty() bool</a></li><li><a href="#Interface.ExplicitMethod">func (t *Interface) ExplicitMethod(i int) *Func</a></li><li><a href="#Interface.Method">func (t *Interface) Method(i int) *Func</a></li><li><a href="#Interface.NumEmbeddeds">func (t *Interface) NumEmbeddeds() int</a></li><li><a href="#Interface.NumExplicitMethods">func (t *Interface) NumExplicitMethods() int</a></li><li><a href="#Interface.NumMethods">func (t *Interface) NumMethods() int</a></li><li><a href="#Interface.String">func (t *Interface) String() string</a></li><li><a href="#Interface.Underlying">func (t *Interface) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#Label">type Label</a></li>
            <ul>
            <li><a href="#NewLabel">func NewLabel(pos token.Pos, pkg *Package, name string) *Label</a></li>
            <li><a href="#Label.Exported">func (obj *Label) Exported() bool</a></li><li><a href="#Label.Id">func (obj *Label) Id() string</a></li><li><a href="#Label.Name">func (obj *Label) Name() string</a></li><li><a href="#Label.Parent">func (obj *Label) Parent() *Scope</a></li><li><a href="#Label.Pkg">func (obj *Label) Pkg() *Package</a></li><li><a href="#Label.Pos">func (obj *Label) Pos() token.Pos</a></li><li><a href="#Label.String">func (obj *Label) String() string</a></li><li><a href="#Label.Type">func (obj *Label) Type() Type</a></li>
            </ul>
          
            <li><a href="#Map">type Map</a></li>
            <ul>
            <li><a href="#NewMap">func NewMap(key, elem Type) *Map</a></li>
            <li><a href="#Map.Elem">func (m *Map) Elem() Type</a></li><li><a href="#Map.Key">func (m *Map) Key() Type</a></li><li><a href="#Map.String">func (t *Map) String() string</a></li><li><a href="#Map.Underlying">func (t *Map) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#MethodSet">type MethodSet</a></li>
            <ul>
            <li><a href="#NewMethodSet">func NewMethodSet(T Type) *MethodSet</a></li>
            <li><a href="#MethodSet.At">func (s *MethodSet) At(i int) *Selection</a></li><li><a href="#MethodSet.Len">func (s *MethodSet) Len() int</a></li><li><a href="#MethodSet.Lookup">func (s *MethodSet) Lookup(pkg *Package, name string) *Selection</a></li><li><a href="#MethodSet.String">func (s *MethodSet) String() string</a></li>
            </ul>
          
            <li><a href="#Named">type Named</a></li>
            <ul>
            <li><a href="#NewNamed">func NewNamed(obj *TypeName, underlying Type, methods []*Func) *Named</a></li>
            <li><a href="#Named.AddMethod">func (t *Named) AddMethod(m *Func)</a></li><li><a href="#Named.Method">func (t *Named) Method(i int) *Func</a></li><li><a href="#Named.NumMethods">func (t *Named) NumMethods() int</a></li><li><a href="#Named.Obj">func (t *Named) Obj() *TypeName</a></li><li><a href="#Named.SetUnderlying">func (t *Named) SetUnderlying(underlying Type)</a></li><li><a href="#Named.String">func (t *Named) String() string</a></li><li><a href="#Named.Underlying">func (t *Named) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#Nil">type Nil</a></li>
            <ul>
            
            <li><a href="#Nil.Exported">func (obj *Nil) Exported() bool</a></li><li><a href="#Nil.Id">func (obj *Nil) Id() string</a></li><li><a href="#Nil.Name">func (obj *Nil) Name() string</a></li><li><a href="#Nil.Parent">func (obj *Nil) Parent() *Scope</a></li><li><a href="#Nil.Pkg">func (obj *Nil) Pkg() *Package</a></li><li><a href="#Nil.Pos">func (obj *Nil) Pos() token.Pos</a></li><li><a href="#Nil.String">func (obj *Nil) String() string</a></li><li><a href="#Nil.Type">func (obj *Nil) Type() Type</a></li>
            </ul>
          
            <li><a href="#Object">type Object</a></li>
            <ul>
            <li><a href="#LookupFieldOrMethod">func LookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (obj Object, index []int, indirect bool)</a></li>
            
            </ul>
          
            <li><a href="#Package">type Package</a></li>
            <ul>
            <li><a href="#NewPackage">func NewPackage(path, name string) *Package</a></li>
            <li><a href="#Package.Complete">func (pkg *Package) Complete() bool</a></li><li><a href="#Package.Imports">func (pkg *Package) Imports() []*Package</a></li><li><a href="#Package.MarkComplete">func (pkg *Package) MarkComplete()</a></li><li><a href="#Package.Name">func (pkg *Package) Name() string</a></li><li><a href="#Package.Path">func (pkg *Package) Path() string</a></li><li><a href="#Package.Scope">func (pkg *Package) Scope() *Scope</a></li><li><a href="#Package.SetImports">func (pkg *Package) SetImports(list []*Package)</a></li><li><a href="#Package.SetName">func (pkg *Package) SetName(name string)</a></li><li><a href="#Package.String">func (pkg *Package) String() string</a></li>
            </ul>
          
            <li><a href="#PkgName">type PkgName</a></li>
            <ul>
            <li><a href="#NewPkgName">func NewPkgName(pos token.Pos, pkg *Package, name string, imported *Package) *PkgName</a></li>
            <li><a href="#PkgName.Exported">func (obj *PkgName) Exported() bool</a></li><li><a href="#PkgName.Id">func (obj *PkgName) Id() string</a></li><li><a href="#PkgName.Imported">func (obj *PkgName) Imported() *Package</a></li><li><a href="#PkgName.Name">func (obj *PkgName) Name() string</a></li><li><a href="#PkgName.Parent">func (obj *PkgName) Parent() *Scope</a></li><li><a href="#PkgName.Pkg">func (obj *PkgName) Pkg() *Package</a></li><li><a href="#PkgName.Pos">func (obj *PkgName) Pos() token.Pos</a></li><li><a href="#PkgName.String">func (obj *PkgName) String() string</a></li><li><a href="#PkgName.Type">func (obj *PkgName) Type() Type</a></li>
            </ul>
          
            <li><a href="#Pointer">type Pointer</a></li>
            <ul>
            <li><a href="#NewPointer">func NewPointer(elem Type) *Pointer</a></li>
            <li><a href="#Pointer.Elem">func (p *Pointer) Elem() Type</a></li><li><a href="#Pointer.String">func (t *Pointer) String() string</a></li><li><a href="#Pointer.Underlying">func (t *Pointer) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#Qualifier">type Qualifier</a></li>
            <ul>
            <li><a href="#RelativeTo">func RelativeTo(pkg *Package) Qualifier</a></li>
            
            </ul>
          
            <li><a href="#Scope">type Scope</a></li>
            <ul>
            <li><a href="#NewScope">func NewScope(parent *Scope, pos, end token.Pos, comment string) *Scope</a></li>
            <li><a href="#Scope.Child">func (s *Scope) Child(i int) *Scope</a></li><li><a href="#Scope.Contains">func (s *Scope) Contains(pos token.Pos) bool</a></li><li><a href="#Scope.End">func (s *Scope) End() token.Pos</a></li><li><a href="#Scope.Innermost">func (s *Scope) Innermost(pos token.Pos) *Scope</a></li><li><a href="#Scope.Insert">func (s *Scope) Insert(obj Object) Object</a></li><li><a href="#Scope.Len">func (s *Scope) Len() int</a></li><li><a href="#Scope.Lookup">func (s *Scope) Lookup(name string) Object</a></li><li><a href="#Scope.LookupParent">func (s *Scope) LookupParent(name string, pos token.Pos) (*Scope, Object)</a></li><li><a href="#Scope.Names">func (s *Scope) Names() []string</a></li><li><a href="#Scope.NumChildren">func (s *Scope) NumChildren() int</a></li><li><a href="#Scope.Parent">func (s *Scope) Parent() *Scope</a></li><li><a href="#Scope.Pos">func (s *Scope) Pos() token.Pos</a></li><li><a href="#Scope.String">func (s *Scope) String() string</a></li><li><a href="#Scope.WriteTo">func (s *Scope) WriteTo(w io.Writer, n int, recurse bool)</a></li>
            </ul>
          
            <li><a href="#Selection">type Selection</a></li>
            <ul>
            
            <li><a href="#Selection.Index">func (s *Selection) Index() []int</a></li><li><a href="#Selection.Indirect">func (s *Selection) Indirect() bool</a></li><li><a href="#Selection.Kind">func (s *Selection) Kind() SelectionKind</a></li><li><a href="#Selection.Obj">func (s *Selection) Obj() Object</a></li><li><a href="#Selection.Recv">func (s *Selection) Recv() Type</a></li><li><a href="#Selection.String">func (s *Selection) String() string</a></li><li><a href="#Selection.Type">func (s *Selection) Type() Type</a></li>
            </ul>
          
            <li><a href="#SelectionKind">type SelectionKind</a></li>
            
            
            
            
          
            <li><a href="#Signature">type Signature</a></li>
            <ul>
            <li><a href="#NewSignature">func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature</a></li>
            <li><a href="#Signature.Params">func (s *Signature) Params() *Tuple</a></li><li><a href="#Signature.Recv">func (s *Signature) Recv() *Var</a></li><li><a href="#Signature.Results">func (s *Signature) Results() *Tuple</a></li><li><a href="#Signature.String">func (t *Signature) String() string</a></li><li><a href="#Signature.Underlying">func (t *Signature) Underlying() Type</a></li><li><a href="#Signature.Variadic">func (s *Signature) Variadic() bool</a></li>
            </ul>
          
            <li><a href="#Sizes">type Sizes</a></li>
            
            
            
            
          
            <li><a href="#Slice">type Slice</a></li>
            <ul>
            <li><a href="#NewSlice">func NewSlice(elem Type) *Slice</a></li>
            <li><a href="#Slice.Elem">func (s *Slice) Elem() Type</a></li><li><a href="#Slice.String">func (t *Slice) String() string</a></li><li><a href="#Slice.Underlying">func (t *Slice) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#StdSizes">type StdSizes</a></li>
            <ul>
            
            <li><a href="#StdSizes.Alignof">func (s *StdSizes) Alignof(T Type) int64</a></li><li><a href="#StdSizes.Offsetsof">func (s *StdSizes) Offsetsof(fields []*Var) []int64</a></li><li><a href="#StdSizes.Sizeof">func (s *StdSizes) Sizeof(T Type) int64</a></li>
            </ul>
          
            <li><a href="#Struct">type Struct</a></li>
            <ul>
            <li><a href="#NewStruct">func NewStruct(fields []*Var, tags []string) *Struct</a></li>
            <li><a href="#Struct.Field">func (s *Struct) Field(i int) *Var</a></li><li><a href="#Struct.NumFields">func (s *Struct) NumFields() int</a></li><li><a href="#Struct.String">func (t *Struct) String() string</a></li><li><a href="#Struct.Tag">func (s *Struct) Tag(i int) string</a></li><li><a href="#Struct.Underlying">func (t *Struct) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#Tuple">type Tuple</a></li>
            <ul>
            <li><a href="#NewTuple">func NewTuple(x ...*Var) *Tuple</a></li>
            <li><a href="#Tuple.At">func (t *Tuple) At(i int) *Var</a></li><li><a href="#Tuple.Len">func (t *Tuple) Len() int</a></li><li><a href="#Tuple.String">func (t *Tuple) String() string</a></li><li><a href="#Tuple.Underlying">func (t *Tuple) Underlying() Type</a></li>
            </ul>
          
            <li><a href="#Type">type Type</a></li>
            <ul>
            <li><a href="#Default">func Default(typ Type) Type</a></li>
            
            </ul>
          
            <li><a href="#TypeAndValue">type TypeAndValue</a></li>
            <ul>
            <li><a href="#Eval">func Eval(fset *token.FileSet, pkg *Package, pos token.Pos, expr string) (TypeAndValue, error)</a></li>
            <li><a href="#TypeAndValue.Addressable">func (tv TypeAndValue) Addressable() bool</a></li><li><a href="#TypeAndValue.Assignable">func (tv TypeAndValue) Assignable() bool</a></li><li><a href="#TypeAndValue.HasOk">func (tv TypeAndValue) HasOk() bool</a></li><li><a href="#TypeAndValue.IsBuiltin">func (tv TypeAndValue) IsBuiltin() bool</a></li><li><a href="#TypeAndValue.IsNil">func (tv TypeAndValue) IsNil() bool</a></li><li><a href="#TypeAndValue.IsType">func (tv TypeAndValue) IsType() bool</a></li><li><a href="#TypeAndValue.IsValue">func (tv TypeAndValue) IsValue() bool</a></li><li><a href="#TypeAndValue.IsVoid">func (tv TypeAndValue) IsVoid() bool</a></li>
            </ul>
          
            <li><a href="#TypeName">type TypeName</a></li>
            <ul>
            <li><a href="#NewTypeName">func NewTypeName(pos token.Pos, pkg *Package, name string, typ Type) *TypeName</a></li>
            <li><a href="#TypeName.Exported">func (obj *TypeName) Exported() bool</a></li><li><a href="#TypeName.Id">func (obj *TypeName) Id() string</a></li><li><a href="#TypeName.Name">func (obj *TypeName) Name() string</a></li><li><a href="#TypeName.Parent">func (obj *TypeName) Parent() *Scope</a></li><li><a href="#TypeName.Pkg">func (obj *TypeName) Pkg() *Package</a></li><li><a href="#TypeName.Pos">func (obj *TypeName) Pos() token.Pos</a></li><li><a href="#TypeName.String">func (obj *TypeName) String() string</a></li><li><a href="#TypeName.Type">func (obj *TypeName) Type() Type</a></li>
            </ul>
          
            <li><a href="#Var">type Var</a></li>
            <ul>
            <li><a href="#NewField">func NewField(pos token.Pos, pkg *Package, name string, typ Type, anonymous bool) *Var</a></li><li><a href="#NewParam">func NewParam(pos token.Pos, pkg *Package, name string, typ Type) *Var</a></li><li><a href="#NewVar">func NewVar(pos token.Pos, pkg *Package, name string, typ Type) *Var</a></li>
            <li><a href="#Var.Anonymous">func (obj *Var) Anonymous() bool</a></li><li><a href="#Var.Exported">func (obj *Var) Exported() bool</a></li><li><a href="#Var.Id">func (obj *Var) Id() string</a></li><li><a href="#Var.IsField">func (obj *Var) IsField() bool</a></li><li><a href="#Var.Name">func (obj *Var) Name() string</a></li><li><a href="#Var.Parent">func (obj *Var) Parent() *Scope</a></li><li><a href="#Var.Pkg">func (obj *Var) Pkg() *Package</a></li><li><a href="#Var.Pos">func (obj *Var) Pos() token.Pos</a></li><li><a href="#Var.String">func (obj *Var) String() string</a></li><li><a href="#Var.Type">func (obj *Var) Type() Type</a></li>
            </ul>
          
          
        </ul>

        
        
          <h4 id="pkg-examples">Examples <a class="permalink" href="#pkg-examples">&para;</a></h4>
          <ul class="list-unstyled">
            <li><a href="#example-Info" onclick="$('#ex-Info').addClass('in').removeClass('collapse').height('auto')">Info</a></li><li><a href="#example-MethodSet" onclick="$('#ex-MethodSet').addClass('in').removeClass('collapse').height('auto')">MethodSet</a></li><li><a href="#example-Scope" onclick="$('#ex-Scope').addClass('in').removeClass('collapse').height('auto')">Scope</a></li>
          </ul>
        

        
        
<h4 id="pkg-files">
  <a href="https://github.com/golang/go/blob/master/src/go/types/">Package Files</a>
  <a class="permalink" href="#pkg-files">&para;</a>
</h4>

<p><a href="https://github.com/golang/go/blob/master/src/go/types/api.go">api.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/assignments.go">assignments.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/builtins.go">builtins.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/call.go">call.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/check.go">check.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/conversions.go">conversions.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/decl.go">decl.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/errors.go">errors.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/eval.go">eval.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/expr.go">expr.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/exprstring.go">exprstring.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/initorder.go">initorder.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/labels.go">labels.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/lookup.go">lookup.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/methodset.go">methodset.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/object.go">object.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/objset.go">objset.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/operand.go">operand.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/ordering.go">ordering.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/package.go">package.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/predicates.go">predicates.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/resolver.go">resolver.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/return.go">return.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/scope.go">scope.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/selection.go">selection.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/sizes.go">sizes.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/stmt.go">stmt.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/type.go">type.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/typestring.go">typestring.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/typexpr.go">typexpr.go</a> <a href="https://github.com/golang/go/blob/master/src/go/types/universe.go">universe.go</a> </p>

        
        

        
        
          <h3 id="pkg-variables">Variables <a class="permalink" href="#pkg-variables">&para;</a></h3>
          <div class="decl" data-kind="v"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/universe.go#L15">❖</a><pre>var (
    <span id="Universe">Universe</span> *<a href="#Scope">Scope</a>
    <span id="Unsafe">Unsafe</span>   *<a href="#Package">Package</a>
)</pre></div><div class="decl" data-kind="v"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/universe.go#L23">❖</a><pre>var <span id="Typ">Typ</span> = []*<a href="#Basic">Basic</a>{
    Invalid: {<a href="#Invalid">Invalid</a>, 0, &#34;invalid type&#34;},

    Bool:          {<a href="#Bool">Bool</a>, <a href="#IsBoolean">IsBoolean</a>, &#34;bool&#34;},
    Int:           {<a href="#Int">Int</a>, <a href="#IsInteger">IsInteger</a>, &#34;int&#34;},
    Int8:          {<a href="#Int8">Int8</a>, <a href="#IsInteger">IsInteger</a>, &#34;int8&#34;},
    Int16:         {<a href="#Int16">Int16</a>, <a href="#IsInteger">IsInteger</a>, &#34;int16&#34;},
    Int32:         {<a href="#Int32">Int32</a>, <a href="#IsInteger">IsInteger</a>, &#34;int32&#34;},
    Int64:         {<a href="#Int64">Int64</a>, <a href="#IsInteger">IsInteger</a>, &#34;int64&#34;},
    Uint:          {<a href="#Uint">Uint</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUnsigned">IsUnsigned</a>, &#34;uint&#34;},
    Uint8:         {<a href="#Uint8">Uint8</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUnsigned">IsUnsigned</a>, &#34;uint8&#34;},
    Uint16:        {<a href="#Uint16">Uint16</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUnsigned">IsUnsigned</a>, &#34;uint16&#34;},
    Uint32:        {<a href="#Uint32">Uint32</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUnsigned">IsUnsigned</a>, &#34;uint32&#34;},
    Uint64:        {<a href="#Uint64">Uint64</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUnsigned">IsUnsigned</a>, &#34;uint64&#34;},
    Uintptr:       {<a href="#Uintptr">Uintptr</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUnsigned">IsUnsigned</a>, &#34;uintptr&#34;},
    Float32:       {<a href="#Float32">Float32</a>, <a href="#IsFloat">IsFloat</a>, &#34;float32&#34;},
    Float64:       {<a href="#Float64">Float64</a>, <a href="#IsFloat">IsFloat</a>, &#34;float64&#34;},
    Complex64:     {<a href="#Complex64">Complex64</a>, <a href="#IsComplex">IsComplex</a>, &#34;complex64&#34;},
    Complex128:    {<a href="#Complex128">Complex128</a>, <a href="#IsComplex">IsComplex</a>, &#34;complex128&#34;},
    String:        {<a href="#String">String</a>, <a href="#IsString">IsString</a>, &#34;string&#34;},
    UnsafePointer: {<a href="#UnsafePointer">UnsafePointer</a>, 0, &#34;Pointer&#34;},

    UntypedBool:    {<a href="#UntypedBool">UntypedBool</a>, <a href="#IsBoolean">IsBoolean</a> | <a href="#IsUntyped">IsUntyped</a>, &#34;untyped bool&#34;},
    UntypedInt:     {<a href="#UntypedInt">UntypedInt</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUntyped">IsUntyped</a>, &#34;untyped int&#34;},
    UntypedRune:    {<a href="#UntypedRune">UntypedRune</a>, <a href="#IsInteger">IsInteger</a> | <a href="#IsUntyped">IsUntyped</a>, &#34;untyped rune&#34;},
    UntypedFloat:   {<a href="#UntypedFloat">UntypedFloat</a>, <a href="#IsFloat">IsFloat</a> | <a href="#IsUntyped">IsUntyped</a>, &#34;untyped float&#34;},
    UntypedComplex: {<a href="#UntypedComplex">UntypedComplex</a>, <a href="#IsComplex">IsComplex</a> | <a href="#IsUntyped">IsUntyped</a>, &#34;untyped complex&#34;},
    UntypedString:  {<a href="#UntypedString">UntypedString</a>, <a href="#IsString">IsString</a> | <a href="#IsUntyped">IsUntyped</a>, &#34;untyped string&#34;},
    UntypedNil:     {<a href="#UntypedNil">UntypedNil</a>, <a href="#IsUntyped">IsUntyped</a>, &#34;untyped nil&#34;},
}</pre></div>
        

        
        
        
          <h3 id="AssertableTo" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L353">AssertableTo</a> <a class="permalink" href="#AssertableTo">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=AssertableTo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L353">❖</a><pre>func AssertableTo(V *<a href="#Interface">Interface</a>, T <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
AssertableTo reports whether a value of type V can be asserted to have type T.
</p>

          
  

        
          <h3 id="AssignableTo" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L359">AssignableTo</a> <a class="permalink" href="#AssignableTo">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=AssignableTo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L359">❖</a><pre>func AssignableTo(V, T <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
AssignableTo reports whether a value of type V is assignable to a variable of type T.
</p>

          
  

        
          <h3 id="Comparable" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L81">Comparable</a> <a class="permalink" href="#Comparable">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Comparable&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L81">❖</a><pre>func Comparable(T <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
Comparable reports whether values of type T are comparable.
</p>

          
  

        
          <h3 id="ConvertibleTo" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L365">ConvertibleTo</a> <a class="permalink" href="#ConvertibleTo">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=ConvertibleTo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L365">❖</a><pre>func ConvertibleTo(V, T <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
ConvertibleTo reports whether a value of type V is convertible to a value of type T.
</p>

          
  

        
          <h3 id="DefPredeclaredTestFuncs" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/universe.go#L170">DefPredeclaredTestFuncs</a> <a class="permalink" href="#DefPredeclaredTestFuncs">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=DefPredeclaredTestFuncs&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/universe.go#L170">❖</a><pre>func DefPredeclaredTestFuncs()</pre></div><p>
DefPredeclaredTestFuncs defines the assert and trace built-ins.
These built-ins are intended for debugging and testing of this
package only.
</p>

          
  

        
          <h3 id="ExprString" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/exprstring.go#L15">ExprString</a> <a class="permalink" href="#ExprString">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=ExprString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/exprstring.go#L15">❖</a><pre>func ExprString(x <a href="/go/ast">ast</a>.<a href="/go/ast#Expr">Expr</a>) <a href="/builtin#string">string</a></pre></div><p>
ExprString returns the (possibly simplified) string representation for x.
</p>

          
  

        
          <h3 id="Id" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L57">Id</a> <a class="permalink" href="#Id">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Id&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L57">❖</a><pre>func Id(pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>) <a href="/builtin#string">string</a></pre></div><p>
Id returns name if it is exported, otherwise it
returns the name qualified with the package <a href="/path">path</a>.
</p>

          
  

        
          <h3 id="Identical" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L114">Identical</a> <a class="permalink" href="#Identical">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Identical&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L114">❖</a><pre>func Identical(x, y <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
Identical reports whether x and y are identical.
</p>

          
  

        
          <h3 id="IdenticalIgnoreTags" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L119">IdenticalIgnoreTags</a> <a class="permalink" href="#IdenticalIgnoreTags">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=IdenticalIgnoreTags&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L119">❖</a><pre>func IdenticalIgnoreTags(x, y <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
IdenticalIgnoreTags reports whether x and y are identical if tags are ignored.
</p>

          
  

        
          <h3 id="Implements" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L371">Implements</a> <a class="permalink" href="#Implements">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Implements&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L371">❖</a><pre>func Implements(V <a href="#Type">Type</a>, T *<a href="#Interface">Interface</a>) <a href="/builtin#bool">bool</a></pre></div><p>
Implements reports whether type V implements interface T.
</p>

          
  

        
          <h3 id="IsInterface" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L75">IsInterface</a> <a class="permalink" href="#IsInterface">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=IsInterface&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L75">❖</a><pre>func IsInterface(typ <a href="#Type">Type</a>) <a href="/builtin#bool">bool</a></pre></div><p>
IsInterface reports whether typ is an interface type.
</p>

          
  

        
          <h3 id="ObjectString" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L350">ObjectString</a> <a class="permalink" href="#ObjectString">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=ObjectString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L350">❖</a><pre>func ObjectString(obj <a href="#Object">Object</a>, qf <a href="#Qualifier">Qualifier</a>) <a href="/builtin#string">string</a></pre></div><p>
ObjectString returns the string form of obj.
The Qualifier controls the printing of
package-level objects, and may be nil.
</p>

          
  

        
          <h3 id="SelectionString" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L119">SelectionString</a> <a class="permalink" href="#SelectionString">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=SelectionString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L119">❖</a><pre>func SelectionString(s *<a href="#Selection">Selection</a>, qf <a href="#Qualifier">Qualifier</a>) <a href="/builtin#string">string</a></pre></div><p>
SelectionString returns the string form of s.
The Qualifier controls the printing of
package-level objects, and may be nil.
</p>
<p>
Examples:
</p>
<pre>&#34;field (T) f int&#34;
&#34;method (T) f(X) Y&#34;
&#34;method expr (T) f(X) Y&#34;
</pre>

          
  

        
          <h3 id="TypeString" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L64">TypeString</a> <a class="permalink" href="#TypeString">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L64">❖</a><pre>func TypeString(typ <a href="#Type">Type</a>, qf <a href="#Qualifier">Qualifier</a>) <a href="/builtin#string">string</a></pre></div><p>
TypeString returns the string representation of typ.
The Qualifier controls the printing of
package-level objects, and may be nil.
</p>

          
  

        
          <h3 id="WriteExpr" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/exprstring.go#L22">WriteExpr</a> <a class="permalink" href="#WriteExpr">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=WriteExpr&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/exprstring.go#L22">❖</a><pre>func WriteExpr(buf *<a href="/bytes">bytes</a>.<a href="/bytes#Buffer">Buffer</a>, x <a href="/go/ast">ast</a>.<a href="/go/ast#Expr">Expr</a>)</pre></div><p>
WriteExpr writes the (possibly simplified) string representation for x to buf.
</p>

          
  

        
          <h3 id="WriteSignature" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L274">WriteSignature</a> <a class="permalink" href="#WriteSignature">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=WriteSignature&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L274">❖</a><pre>func WriteSignature(buf *<a href="/bytes">bytes</a>.<a href="/bytes#Buffer">Buffer</a>, sig *<a href="#Signature">Signature</a>, qf <a href="#Qualifier">Qualifier</a>)</pre></div><p>
WriteSignature writes the representation of the signature sig to buf,
without a leading &#34;func&#34; keyword.
The Qualifier controls the printing of
package-level objects, and may be nil.
</p>

          
  

        
          <h3 id="WriteType" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L73">WriteType</a> <a class="permalink" href="#WriteType">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=WriteType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L73">❖</a><pre>func WriteType(buf *<a href="/bytes">bytes</a>.<a href="/bytes#Buffer">Buffer</a>, typ <a href="#Type">Type</a>, qf <a href="#Qualifier">Qualifier</a>)</pre></div><p>
WriteType writes the string representation of typ to buf.
The Qualifier controls the printing of
package-level objects, and may be nil.
</p>

          
  

        

        
        

        
          <h3 id="Array" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L94">Array</a> <a class="permalink" href="#Array">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Array&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L94">❖</a><pre>type Array struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
An Array represents an array type.
</p>

          
          
          
  


          
            <h4 id="NewArray" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L100">NewArray</a> <a class="permalink" href="#NewArray">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewArray&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L100">❖</a><pre>func NewArray(elem <a href="#Type">Type</a>, len <a href="/builtin#int64">int64</a>) *<a href="#Array">Array</a></pre></div><p>
NewArray returns a new array type for the given element type and length.
</p>

            
  

          

          
            <h4 id="Array.Elem" data-kind="m">func (*Array) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L106">Elem</a> <a class="permalink" href="#Array.Elem">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Array%2FElem&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L106">❖</a><pre>func (a *<a href="#Array">Array</a>) Elem() <a href="#Type">Type</a></pre></div><p>
Elem returns element type of array a.
</p>

            
  

          
            <h4 id="Array.Len" data-kind="m">func (*Array) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L103">Len</a> <a class="permalink" href="#Array.Len">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Array%2FLen&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L103">❖</a><pre>func (a *<a href="#Array">Array</a>) Len() <a href="/builtin#int64">int64</a></pre></div><p>
Len returns the length of array a.
</p>

            
  

          
            <h4 id="Array.String" data-kind="m">func (*Array) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L441">String</a> <a class="permalink" href="#Array.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Array%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L441">❖</a><pre>func (t *<a href="#Array">Array</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Array.Underlying" data-kind="m">func (*Array) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L429">Underlying</a> <a class="permalink" href="#Array.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Array%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L429">❖</a><pre>func (t *<a href="#Array">Array</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Basic" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L78">Basic</a> <a class="permalink" href="#Basic">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Basic&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L78">❖</a><pre>type Basic struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Basic represents a basic type.
</p>

          
          
          
  


          

          
            <h4 id="Basic.Info" data-kind="m">func (*Basic) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L88">Info</a> <a class="permalink" href="#Basic.Info">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Basic%2FInfo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L88">❖</a><pre>func (b *<a href="#Basic">Basic</a>) Info() <a href="#BasicInfo">BasicInfo</a></pre></div><p>
Info returns information about properties of basic type b.
</p>

            
  

          
            <h4 id="Basic.Kind" data-kind="m">func (*Basic) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L85">Kind</a> <a class="permalink" href="#Basic.Kind">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Basic%2FKind&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L85">❖</a><pre>func (b *<a href="#Basic">Basic</a>) Kind() <a href="#BasicKind">BasicKind</a></pre></div><p>
Kind returns the kind of basic type b.
</p>

            
  

          
            <h4 id="Basic.Name" data-kind="m">func (*Basic) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L91">Name</a> <a class="permalink" href="#Basic.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Basic%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L91">❖</a><pre>func (b *<a href="#Basic">Basic</a>) Name() <a href="/builtin#string">string</a></pre></div><p>
Name returns the name of basic type b.
</p>

            
  

          
            <h4 id="Basic.String" data-kind="m">func (*Basic) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L440">String</a> <a class="permalink" href="#Basic.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Basic%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L440">❖</a><pre>func (t *<a href="#Basic">Basic</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Basic.Underlying" data-kind="m">func (*Basic) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L428">Underlying</a> <a class="permalink" href="#Basic.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Basic%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L428">❖</a><pre>func (t *<a href="#Basic">Basic</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="BasicInfo" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L60">BasicInfo</a> <a class="permalink" href="#BasicInfo">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BasicInfo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L60">❖</a><pre>type BasicInfo <a href="/builtin#int">int</a></pre></div><p>
BasicInfo is a set of flags describing properties of a basic type.
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L63">❖</a><pre>const (
    <span id="IsBoolean">IsBoolean</span> <a href="#BasicInfo">BasicInfo</a> = 1 &lt;&lt; <a href="/builtin#iota">iota</a>
    <span id="IsInteger">IsInteger</span>
    <span id="IsUnsigned">IsUnsigned</span>
    <span id="IsFloat">IsFloat</span>
    <span id="IsComplex">IsComplex</span>
    <span id="IsString">IsString</span>
    <span id="IsUntyped">IsUntyped</span>

    <span id="IsOrdered">IsOrdered</span>   = <a href="#IsInteger">IsInteger</a> | <a href="#IsFloat">IsFloat</a> | <a href="#IsString">IsString</a>
    <span id="IsNumeric">IsNumeric</span>   = <a href="#IsInteger">IsInteger</a> | <a href="#IsFloat">IsFloat</a> | <a href="#IsComplex">IsComplex</a>
    <span id="IsConstType">IsConstType</span> = <a href="#IsBoolean">IsBoolean</a> | <a href="#IsNumeric">IsNumeric</a> | <a href="#IsString">IsString</a>
)</pre></div><p>
Properties of basic types.
</p>

          
          
  


          

          
        
          <h3 id="BasicKind" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L20">BasicKind</a> <a class="permalink" href="#BasicKind">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BasicKind&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L20">❖</a><pre>type BasicKind <a href="/builtin#int">int</a></pre></div><p>
BasicKind describes the kind of basic type.
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L22">❖</a><pre>const (
    <span id="Invalid">Invalid</span> <a href="#BasicKind">BasicKind</a> = <a href="/builtin#iota">iota</a> <span class="com">// type is invalid

    // predeclared types</span>
    <span id="Bool">Bool</span>
    <span id="Int">Int</span>
    <span id="Int8">Int8</span>
    <span id="Int16">Int16</span>
    <span id="Int32">Int32</span>
    <span id="Int64">Int64</span>
    <span id="Uint">Uint</span>
    <span id="Uint8">Uint8</span>
    <span id="Uint16">Uint16</span>
    <span id="Uint32">Uint32</span>
    <span id="Uint64">Uint64</span>
    <span id="Uintptr">Uintptr</span>
    <span id="Float32">Float32</span>
    <span id="Float64">Float64</span>
    <span id="Complex64">Complex64</span>
    <span id="Complex128">Complex128</span>
    <span id="String">String</span>
    <span id="UnsafePointer">UnsafePointer</span>

    <span class="com">// types for untyped values</span>
    <span id="UntypedBool">UntypedBool</span>
    <span id="UntypedInt">UntypedInt</span>
    <span id="UntypedRune">UntypedRune</span>
    <span id="UntypedFloat">UntypedFloat</span>
    <span id="UntypedComplex">UntypedComplex</span>
    <span id="UntypedString">UntypedString</span>
    <span id="UntypedNil">UntypedNil</span>

    <span class="com">// aliases</span>
    <span id="Byte">Byte</span> = <a href="#Uint8">Uint8</a>
    <span id="Rune">Rune</span> = <a href="#Int32">Int32</a>
)</pre></div>
          
          
  


          

          
        
          <h3 id="Builtin" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L252">Builtin</a> <a class="permalink" href="#Builtin">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Builtin&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L252">❖</a><pre>type Builtin struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Builtin represents a built-in function.
Builtins don&#39;t have a valid type.
</p>

          
          
          
  


          

          
            <h4 id="Builtin.Exported" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#Builtin.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *Builtin) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Builtin.Id" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#Builtin.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *Builtin) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Builtin.Name" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#Builtin.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *Builtin) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Builtin.Parent" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#Builtin.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *Builtin) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Builtin.Pkg" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#Builtin.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *Builtin) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="Builtin.Pos" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#Builtin.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *Builtin) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Builtin.String" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L363">String</a> <a class="permalink" href="#Builtin.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Builtin%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L363">❖</a><pre>func (obj *<a href="#Builtin">Builtin</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Builtin.Type" data-kind="m">func (*Builtin) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#Builtin.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *Builtin) Type() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Chan" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L351">Chan</a> <a class="permalink" href="#Chan">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Chan&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L351">❖</a><pre>type Chan struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Chan represents a channel type.
</p>

          
          
          
  


          
            <h4 id="NewChan" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L367">NewChan</a> <a class="permalink" href="#NewChan">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewChan&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L367">❖</a><pre>func NewChan(dir <a href="#ChanDir">ChanDir</a>, elem <a href="#Type">Type</a>) *<a href="#Chan">Chan</a></pre></div><p>
NewChan returns a new channel type for the given direction and element type.
</p>

            
  

          

          
            <h4 id="Chan.Dir" data-kind="m">func (*Chan) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L372">Dir</a> <a class="permalink" href="#Chan.Dir">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Chan%2FDir&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L372">❖</a><pre>func (c *<a href="#Chan">Chan</a>) Dir() <a href="#ChanDir">ChanDir</a></pre></div><p>
Dir returns the direction of channel c.
</p>

            
  

          
            <h4 id="Chan.Elem" data-kind="m">func (*Chan) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L375">Elem</a> <a class="permalink" href="#Chan.Elem">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Chan%2FElem&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L375">❖</a><pre>func (c *<a href="#Chan">Chan</a>) Elem() <a href="#Type">Type</a></pre></div><p>
Elem returns the element type of channel c.
</p>

            
  

          
            <h4 id="Chan.String" data-kind="m">func (*Chan) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L449">String</a> <a class="permalink" href="#Chan.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Chan%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L449">❖</a><pre>func (t *<a href="#Chan">Chan</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Chan.Underlying" data-kind="m">func (*Chan) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L437">Underlying</a> <a class="permalink" href="#Chan.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Chan%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L437">❖</a><pre>func (t *<a href="#Chan">Chan</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="ChanDir" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L357">ChanDir</a> <a class="permalink" href="#ChanDir">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ChanDir&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L357">❖</a><pre>type ChanDir <a href="/builtin#int">int</a></pre></div><p>
A ChanDir value indicates a channel direction.
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L360">❖</a><pre>const (
    <span id="SendRecv">SendRecv</span> <a href="#ChanDir">ChanDir</a> = <a href="/builtin#iota">iota</a>
    <span id="SendOnly">SendOnly</span>
    <span id="RecvOnly">RecvOnly</span>
)</pre></div><p>
The direction of a channel is indicated by one of these constants.
</p>

          
          
  


          

          
        
          <h3 id="Checker" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/check.go#L62">Checker</a> <a class="permalink" href="#Checker">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Checker&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/check.go#L62">❖</a><pre>type Checker struct {
    *<a href="#Info">Info</a>
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Checker maintains the state of the type checker.
It must be created with NewChecker.
</p>

          
          
          
  


          
            <h4 id="NewChecker" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/check.go#L148">NewChecker</a> <a class="permalink" href="#NewChecker">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewChecker&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/check.go#L148">❖</a><pre>func NewChecker(conf *<a href="#Config">Config</a>, fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, pkg *<a href="#Package">Package</a>, info *<a href="#Info">Info</a>) *<a href="#Checker">Checker</a></pre></div><p>
NewChecker returns a new Checker instance for a given package.
Package files may be added incrementally via checker.Files.
</p>

            
  

          

          
            <h4 id="Checker.Files" data-kind="m">func (*Checker) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/check.go#L218">Files</a> <a class="permalink" href="#Checker.Files">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Checker%2FFiles&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/check.go#L218">❖</a><pre>func (check *<a href="#Checker">Checker</a>) Files(files []*<a href="/go/ast">ast</a>.<a href="/go/ast#File">File</a>) <a href="/builtin#error">error</a></pre></div><p>
Files checks the provided files as part of the checker&#39;s package.
</p>

            
  

          
        
          <h3 id="Config" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L92">Config</a> <a class="permalink" href="#Config">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Config&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L92">❖</a><pre>type Config struct {
    <span class="com">// If IgnoreFuncBodies is set, function bodies are not
    // type-checked.</span>
    <span id="Config.IgnoreFuncBodies">IgnoreFuncBodies</span> <a href="/builtin#bool">bool</a>

    <span class="com">// If FakeImportC is set, `import &#34;C&#34;` (for packages requiring Cgo)
    // declares an empty &#34;C&#34; package and errors are omitted for qualified
    // identifiers referring to package C (which won&#39;t find an object).
    // This feature is intended for the standard library cmd/api tool.
    //
    // Caution: Effects may be unpredictable due to follow-up errors.
    //          Do not use casually!</span>
    <span id="Config.FakeImportC">FakeImportC</span> <a href="/builtin#bool">bool</a>

    <span class="com">// If Error != nil, it is called with each error found
    // during type checking; err has dynamic type Error.
    // Secondary errors (for instance, to enumerate all types
    // involved in an invalid recursive type declaration) have
    // error strings that start with a &#39;\t&#39; character.
    // If Error == nil, type-checking stops with the first
    // error found.</span>
    <span id="Config.Error">Error</span> func(err <a href="/builtin#error">error</a>)

    <span class="com">// An importer is used to import packages referred to from
    // import declarations.
    // If the installed importer implements ImporterFrom, the type
    // checker calls ImportFrom instead of Import.
    // The type checker reports an error if an importer is needed
    // but none was installed.</span>
    <span id="Config.Importer">Importer</span> <a href="#Importer">Importer</a>

    <span class="com">// If Sizes != nil, it provides the sizing functions for package unsafe.
    // Otherwise &amp;StdSizes{WordSize: 8, MaxAlign: 8} is used instead.</span>
    <span id="Config.Sizes">Sizes</span> <a href="#Sizes">Sizes</a>

    <span class="com">// If DisableUnusedImportCheck is set, packages are not checked
    // for unused imports.</span>
    <span id="Config.DisableUnusedImportCheck">DisableUnusedImportCheck</span> <a href="/builtin#bool">bool</a>
}</pre></div><p>
A Config specifies the configuration for type checking.
The zero value for Config is a ready-to-use default configuration.
</p>

          
          
          
  


          

          
            <h4 id="Config.Check" data-kind="m">func (*Config) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L347">Check</a> <a class="permalink" href="#Config.Check">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Config%2FCheck&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L347">❖</a><pre>func (conf *<a href="#Config">Config</a>) Check(path <a href="/builtin#string">string</a>, fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, files []*<a href="/go/ast">ast</a>.<a href="/go/ast#File">File</a>, info *<a href="#Info">Info</a>) (*<a href="#Package">Package</a>, <a href="/builtin#error">error</a>)</pre></div><p>
Check type-checks a package and returns the resulting package object and
the first error if any. Additionally, if info != nil, Check populates each
of the non-nil maps in the Info struct.
</p>
<p>
The package is marked as complete if no errors occurred, otherwise it is
incomplete. See Config.Error for controlling behavior in the presence of
errors.
</p>
<p>
The package is specified by a list of *ast.Files and corresponding
file set, and the package <a href="/path">path</a> the package is identified with.
The clean path must not be empty or dot (&#34;.&#34;).
</p>

            
  

          
        
          <h3 id="Const" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L144">Const</a> <a class="permalink" href="#Const">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Const&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L144">❖</a><pre>type Const struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Const represents a declared constant.
</p>

          
          
          
  


          
            <h4 id="NewConst" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L150">NewConst</a> <a class="permalink" href="#NewConst">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewConst&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L150">❖</a><pre>func NewConst(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, typ <a href="#Type">Type</a>, val <a href="/go/constant">constant</a>.<a href="/go/constant#Value">Value</a>) *<a href="#Const">Const</a></pre></div>
            
  

          

          
            <h4 id="Const.Exported" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#Const.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *Const) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Const.Id" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#Const.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *Const) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Const.Name" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#Const.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *Const) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Const.Parent" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#Const.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *Const) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Const.Pkg" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#Const.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *Const) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="Const.Pos" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#Const.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *Const) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Const.String" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L357">String</a> <a class="permalink" href="#Const.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Const%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L357">❖</a><pre>func (obj *<a href="#Const">Const</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Const.Type" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#Const.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *Const) Type() <a href="#Type">Type</a></pre></div>
            
  

          
            <h4 id="Const.Val" data-kind="m">func (*Const) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L154">Val</a> <a class="permalink" href="#Const.Val">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Const%2FVal&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L154">❖</a><pre>func (obj *<a href="#Const">Const</a>) Val() <a href="/go/constant">constant</a>.<a href="/go/constant#Value">Value</a></pre></div>
            
  

          
        
          <h3 id="Error" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L41">Error</a> <a class="permalink" href="#Error">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Error&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L41">❖</a><pre>type Error struct {
    <span id="Error.Fset">Fset</span> *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a> <span class="com">// file set for interpretation of Pos</span>
    <span id="Error.Pos">Pos</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>      <span class="com">// error position</span>
    <span id="Error.Msg">Msg</span>  <a href="/builtin#string">string</a>         <span class="com">// error message</span>
    <span id="Error.Soft">Soft</span> <a href="/builtin#bool">bool</a>           <span class="com">// if set, error is &#34;soft&#34;</span>
}</pre></div><p>
An Error describes a type-checking error; it implements the error interface.
A &#34;soft&#34; error is an error that still permits a valid interpretation of a
package (such as &#34;unused variable&#34;); &#34;hard&#34; errors may lead to unpredictable
behavior if ignored.
</p>

          
          
          
  


          

          
            <h4 id="Error.Error" data-kind="m">func (Error) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L50">Error</a> <a class="permalink" href="#Error.Error">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Error%2FError&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L50">❖</a><pre>func (err <a href="#Error">Error</a>) Error() <a href="/builtin#string">string</a></pre></div><p>
Error returns an error string formatted as follows:
filename:line:column: message
</p>

            
  

          
        
          <h3 id="Func" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L194">Func</a> <a class="permalink" href="#Func">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Func&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L194">❖</a><pre>type Func struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Func represents a declared function, concrete method, or abstract
(interface) method. Its Type() is always a *Signature.
An abstract method may belong to many interfaces due to embedding.
</p>

          
          
          
  


          
            <h4 id="MissingMethod" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/lookup.go#L237">MissingMethod</a> <a class="permalink" href="#MissingMethod">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=MissingMethod&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/lookup.go#L237">❖</a><pre>func MissingMethod(V <a href="#Type">Type</a>, T *<a href="#Interface">Interface</a>, static <a href="/builtin#bool">bool</a>) (method *<a href="#Func">Func</a>, wrongType <a href="/builtin#bool">bool</a>)</pre></div><p>
MissingMethod returns (nil, false) if V implements T, otherwise it
returns a missing method required by T and whether it is missing or
just has the wrong type.
</p>
<p>
For non-interface types V, or if static is set, V implements T if all
methods of T are present in V. Otherwise (V is an interface and static
is not set), MissingMethod only checks that methods of T which are also
present in V have matching types (e.g., for a type assertion x.(T) where
x is of interface type V).
</p>

            
  

          
            <h4 id="NewFunc" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L198">NewFunc</a> <a class="permalink" href="#NewFunc">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewFunc&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L198">❖</a><pre>func NewFunc(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, sig *<a href="#Signature">Signature</a>) *<a href="#Func">Func</a></pre></div>
            
  

          

          
            <h4 id="Func.Exported" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#Func.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *Func) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Func.FullName" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L209">FullName</a> <a class="permalink" href="#Func.FullName">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Func%2FFullName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L209">❖</a><pre>func (obj *<a href="#Func">Func</a>) FullName() <a href="/builtin#string">string</a></pre></div><p>
FullName returns the package- or receiver-type-qualified name of
function or method obj.
</p>

            
  

          
            <h4 id="Func.Id" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#Func.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *Func) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Func.Name" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#Func.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *Func) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Func.Parent" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#Func.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *Func) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Func.Pkg" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#Func.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *Func) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="Func.Pos" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#Func.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *Func) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Func.Scope" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L215">Scope</a> <a class="permalink" href="#Func.Scope">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Func%2FScope&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L215">❖</a><pre>func (obj *<a href="#Func">Func</a>) Scope() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Func.String" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L360">String</a> <a class="permalink" href="#Func.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Func%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L360">❖</a><pre>func (obj *<a href="#Func">Func</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Func.Type" data-kind="m">func (*Func) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#Func.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *Func) Type() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="ImportMode" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L68">ImportMode</a> <a class="permalink" href="#ImportMode">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ImportMode&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L68">❖</a><pre>type ImportMode <a href="/builtin#int">int</a></pre></div><p>
ImportMode is reserved for future use.
</p>

          
          
          
  


          

          
        
          <h3 id="Importer" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L59">Importer</a> <a class="permalink" href="#Importer">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Importer&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L59">❖</a><pre>type Importer interface {
    <span class="com">// Import returns the imported package for the given import
    // path, or an error if the package couldn&#39;t be imported.
    // Two calls to Import with the same path return the same
    // package.</span>
    <span id="Importer.Import">Import</span>(path <a href="/builtin#string">string</a>) (*<a href="#Package">Package</a>, <a href="/builtin#error">error</a>)
}</pre></div><p>
An Importer resolves import paths to Packages.
</p>
<p>
CAUTION: This interface does not support the import of locally
vendored packages. See <a href="https://github.com/golang/go/blob/master/s/go15vendor">https://github.com/golang/go/blob/master/s/go15vendor</a>.
If possible, external implementations should implement ImporterFrom.
</p>

          
          
          
  


          

          
        
          <h3 id="ImporterFrom" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L73">ImporterFrom</a> <a class="permalink" href="#ImporterFrom">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ImporterFrom&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L73">❖</a><pre>type ImporterFrom interface {
    <span class="com">// Importer is present for backward-compatibility. Calling
    // Import(path) is the same as calling ImportFrom(path, &#34;&#34;, 0);
    // i.e., locally vendored packages may not be found.
    // The types package does not call Import if an ImporterFrom
    // is present.</span>
    <a href="#Importer">Importer</a>

    <span class="com">// ImportFrom returns the imported package for the given import
    // path when imported by the package in srcDir, or an error
    // if the package couldn&#39;t be imported. The mode value must
    // be 0; it is reserved for future use.
    // Two calls to ImportFrom with the same path and srcDir return
    // the same package.</span>
    <span id="ImporterFrom.ImportFrom">ImportFrom</span>(path, srcDir <a href="/builtin#string">string</a>, mode <a href="#ImportMode">ImportMode</a>) (*<a href="#Package">Package</a>, <a href="/builtin#error">error</a>)
}</pre></div><p>
An ImporterFrom resolves import paths to packages; it
supports vendoring per <a href="https://github.com/golang/go/blob/master/s/go15vendor">https://github.com/golang/go/blob/master/s/go15vendor</a>.
Use go/importer to obtain an ImporterFrom implementation.
</p>

          
          
          
  


          

          
        
          <h3 id="Info" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L136">Info</a> <a class="permalink" href="#Info">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Info&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L136">❖</a><pre>type Info struct {
    <span class="com">// Types maps expressions to their types, and for constant
    // expressions, also their values. Invalid expressions are
    // omitted.
    //
    // For (possibly parenthesized) identifiers denoting built-in
    // functions, the recorded signatures are call-site specific:
    // if the call result is not a constant, the recorded type is
    // an argument-specific signature. Otherwise, the recorded type
    // is invalid.
    //
    // The Types map does not record the type of every identifier,
    // only those that appear where an arbitrary expression is
    // permitted. For instance, the identifier f in a selector
    // expression x.f is found only in the Selections map, the
    // identifier z in a variable declaration &#39;var z int&#39; is found
    // only in the Defs map, and identifiers denoting packages in
    // qualified identifiers are collected in the Uses map.</span>
    <span id="Info.Types">Types</span> map[<a href="/go/ast">ast</a>.<a href="/go/ast#Expr">Expr</a>]<a href="#TypeAndValue">TypeAndValue</a>

    <span class="com">// Defs maps identifiers to the objects they define (including
    // package names, dots &#34;.&#34; of dot-imports, and blank &#34;_&#34; identifiers).
    // For identifiers that do not denote objects (e.g., the package name
    // in package clauses, or symbolic variables t in t := x.(type) of
    // type switch headers), the corresponding objects are nil.
    //
    // For an anonymous field, Defs returns the field *Var it defines.
    //
    // Invariant: Defs[id] == nil || Defs[id].Pos() == id.Pos()</span>
    <span id="Info.Defs">Defs</span> map[*<a href="/go/ast">ast</a>.<a href="/go/ast#Ident">Ident</a>]<a href="#Object">Object</a>

    <span class="com">// Uses maps identifiers to the objects they denote.
    //
    // For an anonymous field, Uses returns the *TypeName it denotes.
    //
    // Invariant: Uses[id].Pos() != id.Pos()</span>
    <span id="Info.Uses">Uses</span> map[*<a href="/go/ast">ast</a>.<a href="/go/ast#Ident">Ident</a>]<a href="#Object">Object</a>

    <span class="com">// Implicits maps nodes to their implicitly declared objects, if any.
    // The following node and object types may appear:
    //
    //	node               declared object
    //
    //	*ast.ImportSpec    *PkgName for dot-imports and imports without renames
    //	*ast.CaseClause    type-specific *Var for each type switch case clause (incl. default)
    //      *ast.Field         anonymous parameter *Var
    //</span>
    <span id="Info.Implicits">Implicits</span> map[<a href="/go/ast">ast</a>.<a href="/go/ast#Node">Node</a>]<a href="#Object">Object</a>

    <span class="com">// Selections maps selector expressions (excluding qualified identifiers)
    // to their corresponding selections.</span>
    <span id="Info.Selections">Selections</span> map[*<a href="/go/ast">ast</a>.<a href="/go/ast#SelectorExpr">SelectorExpr</a>]*<a href="#Selection">Selection</a>

    <span class="com">// Scopes maps ast.Nodes to the scopes they define. Package scopes are not
    // associated with a specific node but with all files belonging to a package.
    // Thus, the package scope can be found in the type-checked Package object.
    // Scopes nest, with the Universe scope being the outermost scope, enclosing
    // the package scope, which contains (one or more) files scopes, which enclose
    // function scopes which in turn enclose statement and function literal scopes.
    // Note that even though package-level functions are declared in the package
    // scope, the function scopes are embedded in the file scope of the file
    // containing the function declaration.
    //
    // The following node types may appear in Scopes:
    //
    //	*ast.File
    //	*ast.FuncType
    //	*ast.BlockStmt
    //	*ast.IfStmt
    //	*ast.SwitchStmt
    //	*ast.TypeSwitchStmt
    //	*ast.CaseClause
    //	*ast.CommClause
    //	*ast.ForStmt
    //	*ast.RangeStmt
    //</span>
    <span id="Info.Scopes">Scopes</span> map[<a href="/go/ast">ast</a>.<a href="/go/ast#Node">Node</a>]*<a href="#Scope">Scope</a>

    <span class="com">// InitOrder is the list of package-level initializers in the order in which
    // they must be executed. Initializers referring to variables related by an
    // initialization dependency appear in topological order, the others appear
    // in source order. Variables without an initialization expression do not
    // appear in this list.</span>
    <span id="Info.InitOrder">InitOrder</span> []*<a href="#Initializer">Initializer</a>
}</pre></div><p>
Info holds result type information for a type-checked package.
Only the information for which a map is provided is collected.
If the package has type errors, the collected information may
be incomplete.
</p>

          
          
          
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-Info">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-Info">Example</a></div>
        <div id="ex-Info" class="panel-collapse collapse"><div class="panel-body">
          <p><p>
ExampleInfo prints various facts recorded by the type checker in a
types.Info struct: definitions of and references to each named object,
and the type, value, and mode of every expression in the package.
</p>

          <p>Code:
          <pre><span class="com">// Parse a single source file.</span>
const input = `
package fib

type S string

var a, b, c = len(b), S(c), &#34;hello&#34;

func fib(x int) int {
	if x &lt; 2 {
		return x
	}
	return fib(x-1) - fib(x-2)
}`
fset := token.NewFileSet()
f, err := parser.ParseFile(fset, &#34;fib.go&#34;, input, 0)
if err != nil {
    log.Fatal(err)
}

<span class="com">// Type-check the package.
// We create an empty map for each kind of input
// we&#39;re interested in, and Check populates them.</span>
info := types.Info{
    Types: make(map[ast.Expr]types.TypeAndValue),
    Defs:  make(map[*ast.Ident]types.Object),
    Uses:  make(map[*ast.Ident]types.Object),
}
var conf types.Config
pkg, err := conf.Check(&#34;fib&#34;, fset, []*ast.File{f}, &amp;info)
if err != nil {
    log.Fatal(err)
}

<span class="com">// Print package-level variables in initialization order.</span>
fmt.Printf(&#34;InitOrder: %v\n\n&#34;, info.InitOrder)

<span class="com">// For each named object, print the line and
// column of its definition and each of its uses.</span>
fmt.Println(&#34;Defs and Uses of each named object:&#34;)
usesByObj := make(map[types.Object][]string)
for id, obj := range info.Uses {
    posn := fset.Position(id.Pos())
    lineCol := fmt.Sprintf(&#34;%d:%d&#34;, posn.Line, posn.Column)
    usesByObj[obj] = append(usesByObj[obj], lineCol)
}
var items []string
for obj, uses := range usesByObj {
    sort.Strings(uses)
    item := fmt.Sprintf(&#34;%s:\n  defined at %s\n  used at %s&#34;,
        types.ObjectString(obj, types.RelativeTo(pkg)),
        fset.Position(obj.Pos()),
        strings.Join(uses, &#34;, &#34;))
    items = append(items, item)
}
sort.Strings(items) <span class="com">// sort by line:col, in effect</span>
fmt.Println(strings.Join(items, &#34;\n&#34;))
fmt.Println()

fmt.Println(&#34;Types and Values of each expression:&#34;)
items = nil
for expr, tv := range info.Types {
    var buf bytes.Buffer
    posn := fset.Position(expr.Pos())
    tvstr := tv.Type.String()
    if tv.Value != nil {
        tvstr += &#34; = &#34; + tv.Value.String()
    }
    <span class="com">// line:col | expr | mode : type = value</span>
    fmt.Fprintf(&amp;buf, &#34;%2d:%2d | %-19s | %-7s : %s&#34;,
        posn.Line, posn.Column, exprString(fset, expr),
        mode(tv), tvstr)
    items = append(items, buf.String())
}
sort.Strings(items)
fmt.Println(strings.Join(items, &#34;\n&#34;))</pre>
          <p>Output:<pre>InitOrder: [c = &#34;hello&#34; b = S(c) a = len(b)]

Defs and Uses of each named object:
builtin len:
  defined at -
  used at 6:15
func fib(x int) int:
  defined at fib.go:8:6
  used at 12:20, 12:9
type S string:
  defined at fib.go:4:6
  used at 6:23
type int int:
  defined at -
  used at 8:12, 8:17
type string string:
  defined at -
  used at 4:8
var b S:
  defined at fib.go:6:8
  used at 6:19
var c string:
  defined at fib.go:6:11
  used at 6:25
var x int:
  defined at fib.go:8:10
  used at 10:10, 12:13, 12:24, 9:5

Types and Values of each expression:
 4: 8 | string              | type    : string
 6:15 | len                 | builtin : func(string) int
 6:15 | len(b)              | value   : int
 6:19 | b                   | var     : fib.S
 6:23 | S                   | type    : fib.S
 6:23 | S(c)                | value   : fib.S
 6:25 | c                   | var     : string
 6:29 | &#34;hello&#34;             | value   : string = &#34;hello&#34;
 8:12 | int                 | type    : int
 8:17 | int                 | type    : int
 9: 5 | x                   | var     : int
 9: 5 | x &lt; 2               | value   : untyped bool
 9: 9 | 2                   | value   : int = 2
10:10 | x                   | var     : int
12: 9 | fib                 | value   : func(x int) int
12: 9 | fib(x - 1)          | value   : int
12: 9 | fib(x-1) - fib(x-2) | value   : int
12:13 | x                   | var     : int
12:13 | x - 1               | value   : int
12:15 | 1                   | value   : int = 1
12:20 | fib                 | value   : func(x int) int
12:20 | fib(x - 2)          | value   : int
12:24 | x                   | var     : int
12:24 | x - 2               | value   : int
12:26 | 2                   | value   : int = 2
</pre>
        </div></div>
      </div>
    
    </div>
  


          

          
            <h4 id="Info.ObjectOf" data-kind="m">func (*Info) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L245">ObjectOf</a> <a class="permalink" href="#Info.ObjectOf">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Info%2FObjectOf&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L245">❖</a><pre>func (info *<a href="#Info">Info</a>) ObjectOf(id *<a href="/go/ast">ast</a>.<a href="/go/ast#Ident">Ident</a>) <a href="#Object">Object</a></pre></div><p>
ObjectOf returns the object denoted by the specified id,
or nil if not found.
</p>
<p>
If id is an anonymous struct field, ObjectOf returns the field (*Var)
it uses, not the type (*TypeName) it defines.
</p>
<p>
Precondition: the Uses and Defs maps are populated.
</p>

            
  

          
            <h4 id="Info.TypeOf" data-kind="m">func (*Info) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L225">TypeOf</a> <a class="permalink" href="#Info.TypeOf">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Info%2FTypeOf&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L225">❖</a><pre>func (info *<a href="#Info">Info</a>) TypeOf(e <a href="/go/ast">ast</a>.<a href="/go/ast#Expr">Expr</a>) <a href="#Type">Type</a></pre></div><p>
TypeOf returns the type of expression e, or nil if not found.
Precondition: the Types, Uses and Defs maps are populated.
</p>

            
  

          
        
          <h3 id="Initializer" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L318">Initializer</a> <a class="permalink" href="#Initializer">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Initializer&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L318">❖</a><pre>type Initializer struct {
    <span id="Initializer.Lhs">Lhs</span> []*<a href="#Var">Var</a> <span class="com">// var Lhs = Rhs</span>
    <span id="Initializer.Rhs">Rhs</span> <a href="/go/ast">ast</a>.<a href="/go/ast#Expr">Expr</a>
}</pre></div><p>
An Initializer describes a package-level variable, or a list of variables in case
of a multi-valued initialization expression, and the corresponding initialization
expression.
</p>

          
          
          
  


          

          
            <h4 id="Initializer.String" data-kind="m">func (*Initializer) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L323">String</a> <a class="permalink" href="#Initializer.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Initializer%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L323">❖</a><pre>func (init *<a href="#Initializer">Initializer</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
        
          <h3 id="Interface" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L241">Interface</a> <a class="permalink" href="#Interface">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Interface&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L241">❖</a><pre>type Interface struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
An Interface represents an interface type.
</p>

          
          
          
  


          
            <h4 id="NewInterface" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L249">NewInterface</a> <a class="permalink" href="#NewInterface">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewInterface&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L249">❖</a><pre>func NewInterface(methods []*<a href="#Func">Func</a>, embeddeds []*<a href="#Named">Named</a>) *<a href="#Interface">Interface</a></pre></div><p>
NewInterface returns a new interface for the given methods and embedded types.
</p>

            
  

          

          
            <h4 id="Interface.Complete" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L301">Complete</a> <a class="permalink" href="#Interface.Complete">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FComplete&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L301">❖</a><pre>func (t *<a href="#Interface">Interface</a>) Complete() *<a href="#Interface">Interface</a></pre></div><p>
Complete computes the interface&#39;s method set. It must be called by users of
NewInterface after the interface&#39;s embedded types are fully defined and
before using the interface type in any way other than to form other types.
Complete returns the receiver.
</p>

            
  

          
            <h4 id="Interface.Embedded" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L285">Embedded</a> <a class="permalink" href="#Interface.Embedded">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FEmbedded&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L285">❖</a><pre>func (t *<a href="#Interface">Interface</a>) Embedded(i <a href="/builtin#int">int</a>) *<a href="#Named">Named</a></pre></div><p>
Embedded returns the i&#39;th embedded type of interface t for 0 &lt;= i &lt; t.NumEmbeddeds().
The types are ordered by the corresponding TypeName&#39;s unique Id.
</p>

            
  

          
            <h4 id="Interface.Empty" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L295">Empty</a> <a class="permalink" href="#Interface.Empty">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FEmpty&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L295">❖</a><pre>func (t *<a href="#Interface">Interface</a>) Empty() <a href="/builtin#bool">bool</a></pre></div><p>
Empty returns true if t is the empty interface.
</p>

            
  

          
            <h4 id="Interface.ExplicitMethod" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L278">ExplicitMethod</a> <a class="permalink" href="#Interface.ExplicitMethod">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FExplicitMethod&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L278">❖</a><pre>func (t *<a href="#Interface">Interface</a>) ExplicitMethod(i <a href="/builtin#int">int</a>) *<a href="#Func">Func</a></pre></div><p>
ExplicitMethod returns the i&#39;th explicitly declared method of interface t for 0 &lt;= i &lt; t.NumExplicitMethods().
The methods are ordered by their unique Id.
</p>

            
  

          
            <h4 id="Interface.Method" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L292">Method</a> <a class="permalink" href="#Interface.Method">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FMethod&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L292">❖</a><pre>func (t *<a href="#Interface">Interface</a>) Method(i <a href="/builtin#int">int</a>) *<a href="#Func">Func</a></pre></div><p>
Method returns the i&#39;th method of interface t for 0 &lt;= i &lt; t.NumMethods().
The methods are ordered by their unique Id.
</p>

            
  

          
            <h4 id="Interface.NumEmbeddeds" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L281">NumEmbeddeds</a> <a class="permalink" href="#Interface.NumEmbeddeds">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FNumEmbeddeds&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L281">❖</a><pre>func (t *<a href="#Interface">Interface</a>) NumEmbeddeds() <a href="/builtin#int">int</a></pre></div><p>
NumEmbeddeds returns the number of embedded types in interface t.
</p>

            
  

          
            <h4 id="Interface.NumExplicitMethods" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L274">NumExplicitMethods</a> <a class="permalink" href="#Interface.NumExplicitMethods">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FNumExplicitMethods&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L274">❖</a><pre>func (t *<a href="#Interface">Interface</a>) NumExplicitMethods() <a href="/builtin#int">int</a></pre></div><p>
NumExplicitMethods returns the number of explicitly declared methods of interface t.
</p>

            
  

          
            <h4 id="Interface.NumMethods" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L288">NumMethods</a> <a class="permalink" href="#Interface.NumMethods">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FNumMethods&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L288">❖</a><pre>func (t *<a href="#Interface">Interface</a>) NumMethods() <a href="/builtin#int">int</a></pre></div><p>
NumMethods returns the total number of methods of interface t.
</p>

            
  

          
            <h4 id="Interface.String" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L447">String</a> <a class="permalink" href="#Interface.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L447">❖</a><pre>func (t *<a href="#Interface">Interface</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Interface.Underlying" data-kind="m">func (*Interface) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L435">Underlying</a> <a class="permalink" href="#Interface.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Interface%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L435">❖</a><pre>func (t *<a href="#Interface">Interface</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Label" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L241">Label</a> <a class="permalink" href="#Label">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Label&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L241">❖</a><pre>type Label struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Label represents a declared label.
</p>

          
          
          
  


          
            <h4 id="NewLabel" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L246">NewLabel</a> <a class="permalink" href="#NewLabel">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewLabel&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L246">❖</a><pre>func NewLabel(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>) *<a href="#Label">Label</a></pre></div>
            
  

          

          
            <h4 id="Label.Exported" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#Label.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *Label) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Label.Id" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#Label.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *Label) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Label.Name" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#Label.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *Label) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Label.Parent" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#Label.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *Label) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Label.Pkg" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#Label.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *Label) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="Label.Pos" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#Label.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *Label) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Label.String" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L362">String</a> <a class="permalink" href="#Label.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Label%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L362">❖</a><pre>func (obj *<a href="#Label">Label</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Label.Type" data-kind="m">func (*Label) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#Label.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *Label) Type() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Map" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L335">Map</a> <a class="permalink" href="#Map">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Map&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L335">❖</a><pre>type Map struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Map represents a map type.
</p>

          
          
          
  


          
            <h4 id="NewMap" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L340">NewMap</a> <a class="permalink" href="#NewMap">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewMap&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L340">❖</a><pre>func NewMap(key, elem <a href="#Type">Type</a>) *<a href="#Map">Map</a></pre></div><p>
NewMap returns a new map for the given key and element types.
</p>

            
  

          

          
            <h4 id="Map.Elem" data-kind="m">func (*Map) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L348">Elem</a> <a class="permalink" href="#Map.Elem">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Map%2FElem&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L348">❖</a><pre>func (m *<a href="#Map">Map</a>) Elem() <a href="#Type">Type</a></pre></div><p>
Elem returns the element type of map m.
</p>

            
  

          
            <h4 id="Map.Key" data-kind="m">func (*Map) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L345">Key</a> <a class="permalink" href="#Map.Key">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Map%2FKey&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L345">❖</a><pre>func (m *<a href="#Map">Map</a>) Key() <a href="#Type">Type</a></pre></div><p>
Key returns the key type of map m.
</p>

            
  

          
            <h4 id="Map.String" data-kind="m">func (*Map) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L448">String</a> <a class="permalink" href="#Map.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Map%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L448">❖</a><pre>func (t *<a href="#Map">Map</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Map.Underlying" data-kind="m">func (*Map) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L436">Underlying</a> <a class="permalink" href="#Map.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Map%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L436">❖</a><pre>func (t *<a href="#Map">Map</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="MethodSet" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L18">MethodSet</a> <a class="permalink" href="#MethodSet">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=MethodSet&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L18">❖</a><pre>type MethodSet struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A MethodSet is an ordered set of concrete or abstract (interface) methods;
a method is a MethodVal selection, and they are ordered by ascending m.Obj().Id().
The zero value for a MethodSet is a ready-to-use empty method set.
</p>

          
          
          
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-MethodSet">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-MethodSet">Example</a></div>
        <div id="ex-MethodSet" class="panel-collapse collapse"><div class="panel-body">
          <p><p>
ExampleMethodSet prints the method sets of various types.
</p>

          <p>Code:<span class="pull-right"><a href="?play=MethodSet">play</a>&nbsp;</span>
          <pre><span class="com">// Parse a single source file.</span>
const input = `
package temperature
import &#34;fmt&#34;
type Celsius float64
func (c Celsius) String() string  { return fmt.Sprintf(&#34;%g°C&#34;, c) }
func (c *Celsius) SetF(f float64) { *c = Celsius(f - 32 / 9 * 5) }
`
fset := token.NewFileSet()
f, err := parser.ParseFile(fset, &#34;celsius.go&#34;, input, 0)
if err != nil {
    log.Fatal(err)
}

<span class="com">// Type-check a package consisting of this file.
// Type information for the imported packages
// comes from $GOROOT/pkg/$GOOS_$GOOARCH/fmt.a.</span>
conf := types.Config{Importer: importer.Default()}
pkg, err := conf.Check(&#34;temperature&#34;, fset, []*ast.File{f}, nil)
if err != nil {
    log.Fatal(err)
}

<span class="com">// Print the method sets of Celsius and *Celsius.</span>
celsius := pkg.Scope().Lookup(&#34;Celsius&#34;).Type()
for _, t := range []types.Type{celsius, types.NewPointer(celsius)} {
    fmt.Printf(&#34;Method set of %s:\n&#34;, t)
    mset := types.NewMethodSet(t)
    for i := 0; i &lt; mset.Len(); i++ {
        fmt.Println(mset.At(i))
    }
    fmt.Println()
}</pre>
          <p>Output:<pre>Method set of temperature.Celsius:
method (temperature.Celsius) String() string

Method set of *temperature.Celsius:
method (*temperature.Celsius) SetF(f float64)
method (*temperature.Celsius) String() string
</pre>
        </div></div>
      </div>
    
    </div>
  


          
            <h4 id="NewMethodSet" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L67">NewMethodSet</a> <a class="permalink" href="#NewMethodSet">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewMethodSet&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L67">❖</a><pre>func NewMethodSet(T <a href="#Type">Type</a>) *<a href="#MethodSet">MethodSet</a></pre></div><p>
NewMethodSet returns the method set for the given type T.
It always returns a non-nil method set, even if it is empty.
</p>

            
  

          

          
            <h4 id="MethodSet.At" data-kind="m">func (*MethodSet) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L40">At</a> <a class="permalink" href="#MethodSet.At">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=MethodSet%2FAt&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L40">❖</a><pre>func (s *<a href="#MethodSet">MethodSet</a>) At(i <a href="/builtin#int">int</a>) *<a href="#Selection">Selection</a></pre></div><p>
At returns the i&#39;th method in s for 0 &lt;= i &lt; s.Len().
</p>

            
  

          
            <h4 id="MethodSet.Len" data-kind="m">func (*MethodSet) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L37">Len</a> <a class="permalink" href="#MethodSet.Len">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=MethodSet%2FLen&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L37">❖</a><pre>func (s *<a href="#MethodSet">MethodSet</a>) Len() <a href="/builtin#int">int</a></pre></div><p>
Len returns the number of methods in s.
</p>

            
  

          
            <h4 id="MethodSet.Lookup" data-kind="m">func (*MethodSet) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L43">Lookup</a> <a class="permalink" href="#MethodSet.Lookup">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=MethodSet%2FLookup&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L43">❖</a><pre>func (s *<a href="#MethodSet">MethodSet</a>) Lookup(pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>) *<a href="#Selection">Selection</a></pre></div><p>
Lookup returns the method with matching package and name, or nil if not found.
</p>

            
  

          
            <h4 id="MethodSet.String" data-kind="m">func (*MethodSet) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L22">String</a> <a class="permalink" href="#MethodSet.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=MethodSet%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/methodset.go#L22">❖</a><pre>func (s *<a href="#MethodSet">MethodSet</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
        
          <h3 id="Named" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L378">Named</a> <a class="permalink" href="#Named">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Named&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L378">❖</a><pre>type Named struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Named represents a named type.
</p>

          
          
          
  


          
            <h4 id="NewNamed" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L386">NewNamed</a> <a class="permalink" href="#NewNamed">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewNamed&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L386">❖</a><pre>func NewNamed(obj *<a href="#TypeName">TypeName</a>, underlying <a href="#Type">Type</a>, methods []*<a href="#Func">Func</a>) *<a href="#Named">Named</a></pre></div><p>
NewNamed returns a new named type for the given type name, underlying type, and associated methods.
The underlying type must not be a *Named.
</p>

            
  

          

          
            <h4 id="Named.AddMethod" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L420">AddMethod</a> <a class="permalink" href="#Named.AddMethod">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FAddMethod&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L420">❖</a><pre>func (t *<a href="#Named">Named</a>) AddMethod(m *<a href="#Func">Func</a>)</pre></div><p>
AddMethod adds method m unless it is already in the method list.
TODO(gri) find a better solution instead of providing this function
</p>

            
  

          
            <h4 id="Named.Method" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L404">Method</a> <a class="permalink" href="#Named.Method">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FMethod&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L404">❖</a><pre>func (t *<a href="#Named">Named</a>) Method(i <a href="/builtin#int">int</a>) *<a href="#Func">Func</a></pre></div><p>
Method returns the i&#39;th method of named type t for 0 &lt;= i &lt; t.NumMethods().
</p>

            
  

          
            <h4 id="Named.NumMethods" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L401">NumMethods</a> <a class="permalink" href="#Named.NumMethods">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FNumMethods&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L401">❖</a><pre>func (t *<a href="#Named">Named</a>) NumMethods() <a href="/builtin#int">int</a></pre></div><p>
NumMethods returns the number of explicit methods whose receiver is named type t.
</p>

            
  

          
            <h4 id="Named.Obj" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L398">Obj</a> <a class="permalink" href="#Named.Obj">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FObj&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L398">❖</a><pre>func (t *<a href="#Named">Named</a>) Obj() *<a href="#TypeName">TypeName</a></pre></div><p>
TypeName returns the type name for the named type t.
</p>

            
  

          
            <h4 id="Named.SetUnderlying" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L408">SetUnderlying</a> <a class="permalink" href="#Named.SetUnderlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FSetUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L408">❖</a><pre>func (t *<a href="#Named">Named</a>) SetUnderlying(underlying <a href="#Type">Type</a>)</pre></div><p>
SetUnderlying sets the underlying type and marks t as complete.
TODO(gri) determine if there&#39;s a better solution rather than providing this function
</p>

            
  

          
            <h4 id="Named.String" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L450">String</a> <a class="permalink" href="#Named.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L450">❖</a><pre>func (t *<a href="#Named">Named</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Named.Underlying" data-kind="m">func (*Named) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L438">Underlying</a> <a class="permalink" href="#Named.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Named%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L438">❖</a><pre>func (t *<a href="#Named">Named</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Nil" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L262">Nil</a> <a class="permalink" href="#Nil">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Nil&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L262">❖</a><pre>type Nil struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
Nil represents the predeclared value nil.
</p>

          
          
          
  


          

          
            <h4 id="Nil.Exported" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#Nil.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *Nil) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Nil.Id" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#Nil.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *Nil) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Nil.Name" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#Nil.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *Nil) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Nil.Parent" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#Nil.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *Nil) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Nil.Pkg" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#Nil.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *Nil) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="Nil.Pos" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#Nil.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *Nil) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Nil.String" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L364">String</a> <a class="permalink" href="#Nil.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Nil%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L364">❖</a><pre>func (obj *<a href="#Nil">Nil</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Nil.Type" data-kind="m">func (*Nil) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#Nil.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *Nil) Type() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Object" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L21">Object</a> <a class="permalink" href="#Object">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Object&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L21">❖</a><pre>type Object interface {
    <span id="Object.Parent">Parent</span>() *<a href="#Scope">Scope</a> <span class="com">// scope in which this object is declared; nil for methods and struct fields</span>
    <span id="Object.Pos">Pos</span>() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of object identifier in declaration</span>
    <span id="Object.Pkg">Pkg</span>() *<a href="#Package">Package</a>  <span class="com">// nil for objects in the Universe scope and labels</span>
    <span id="Object.Name">Name</span>() <a href="/builtin#string">string</a>   <span class="com">// package local object name</span>
    <span id="Object.Type">Type</span>() <a href="#Type">Type</a>     <span class="com">// object type</span>
    <span id="Object.Exported">Exported</span>() <a href="/builtin#bool">bool</a> <span class="com">// reports whether the name starts with a capital letter</span>
    <span id="Object.Id">Id</span>() <a href="/builtin#string">string</a>     <span class="com">// object id (see Id below)

    // String returns a human-readable string of the object.</span>
    <span id="Object.String">String</span>() <a href="/builtin#string">string</a>
    <span class="com">// contains filtered or unexported methods</span>
}</pre></div><p>
An Object describes a named language entity such as a package,
constant, type, variable, function (incl. methods), or label.
All objects implement the Object interface.
</p>

          
          
          
  


          
            <h4 id="LookupFieldOrMethod" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/lookup.go#L35">LookupFieldOrMethod</a> <a class="permalink" href="#LookupFieldOrMethod">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=LookupFieldOrMethod&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/lookup.go#L35">❖</a><pre>func LookupFieldOrMethod(T <a href="#Type">Type</a>, addressable <a href="/builtin#bool">bool</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>) (obj <a href="#Object">Object</a>, index []<a href="/builtin#int">int</a>, indirect <a href="/builtin#bool">bool</a>)</pre></div><p>
LookupFieldOrMethod looks up a field or method with given package and name
in T and returns the corresponding *Var or *Func, an index sequence, and a
bool indicating if there were any pointer indirections on the path to the
field or method. If addressable is set, T is the type of an addressable
variable (only matters for method lookups).
</p>
<p>
The last index entry is the field or method index in the (possibly embedded)
type where the entry was found, either:
</p>
<pre>1) the list of declared methods of a named type; or
2) the list of all methods (method set) of an interface type; or
3) the list of fields of a struct type.
</pre>
<p>
The earlier index entries are the indices of the anonymous struct fields
traversed to get to the found entry, starting at depth 0.
</p>
<p>
If no entry is found, a nil object is returned. In this case, the returned
index and indirect values have the following meaning:
</p>
<pre>	- If index != nil, the index sequence points to an ambiguous entry
	(the same name appeared more than once at the same embedding level).

	- If indirect is set, a method with a pointer receiver type was found
     but there was no pointer on the path from the actual receiver type to
	the method&#39;s formal receiver base type, nor was the receiver addressable.
</pre>

            
  

          

          
        
          <h3 id="Package" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L13">Package</a> <a class="permalink" href="#Package">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Package&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L13">❖</a><pre>type Package struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Package describes a Go package.
</p>

          
          
          
  


          
            <h4 id="NewPackage" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L25">NewPackage</a> <a class="permalink" href="#NewPackage">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewPackage&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L25">❖</a><pre>func NewPackage(path, name <a href="/builtin#string">string</a>) *<a href="#Package">Package</a></pre></div><p>
NewPackage returns a new Package for the given package <a href="/path">path</a> and name;
the name must not be the blank identifier.
The package is not complete and contains no explicit imports.
</p>

            
  

          

          
            <h4 id="Package.Complete" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L49">Complete</a> <a class="permalink" href="#Package.Complete">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FComplete&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L49">❖</a><pre>func (pkg *<a href="#Package">Package</a>) Complete() <a href="/builtin#bool">bool</a></pre></div><p>
A package is complete if its scope contains (at least) all
exported objects; otherwise it is incomplete.
</p>

            
  

          
            <h4 id="Package.Imports" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L60">Imports</a> <a class="permalink" href="#Package.Imports">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FImports&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L60">❖</a><pre>func (pkg *<a href="#Package">Package</a>) Imports() []*<a href="#Package">Package</a></pre></div><p>
Imports returns the list of packages directly imported by
pkg; the list is in source order. Package unsafe is excluded.
</p>
<p>
If pkg was loaded from export data, Imports includes packages that
provide package-level objects referenced by pkg. This may be more or
less than the set of packages directly imported by pkg&#39;s source code.
</p>

            
  

          
            <h4 id="Package.MarkComplete" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L52">MarkComplete</a> <a class="permalink" href="#Package.MarkComplete">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FMarkComplete&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L52">❖</a><pre>func (pkg *<a href="#Package">Package</a>) MarkComplete()</pre></div><p>
MarkComplete marks a package as complete.
</p>

            
  

          
            <h4 id="Package.Name" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L37">Name</a> <a class="permalink" href="#Package.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L37">❖</a><pre>func (pkg *<a href="#Package">Package</a>) Name() <a href="/builtin#string">string</a></pre></div><p>
Name returns the package name.
</p>

            
  

          
            <h4 id="Package.Path" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L34">Path</a> <a class="permalink" href="#Package.Path">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FPath&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L34">❖</a><pre>func (pkg *<a href="#Package">Package</a>) Path() <a href="/builtin#string">string</a></pre></div><p>
Path returns the package <a href="/path">path</a>.
</p>

            
  

          
            <h4 id="Package.Scope" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L45">Scope</a> <a class="permalink" href="#Package.Scope">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FScope&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L45">❖</a><pre>func (pkg *<a href="#Package">Package</a>) Scope() *<a href="#Scope">Scope</a></pre></div><p>
Scope returns the (complete or incomplete) package scope
holding the objects declared at package level (TypeNames,
Consts, Vars, and Funcs).
</p>

            
  

          
            <h4 id="Package.SetImports" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L64">SetImports</a> <a class="permalink" href="#Package.SetImports">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FSetImports&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L64">❖</a><pre>func (pkg *<a href="#Package">Package</a>) SetImports(list []*<a href="#Package">Package</a>)</pre></div><p>
SetImports sets the list of explicitly imported packages to list.
It is the caller&#39;s responsibility to make sure list elements are unique.
</p>

            
  

          
            <h4 id="Package.SetName" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L40">SetName</a> <a class="permalink" href="#Package.SetName">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FSetName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L40">❖</a><pre>func (pkg *<a href="#Package">Package</a>) SetName(name <a href="/builtin#string">string</a>)</pre></div><p>
SetName sets the package name.
</p>

            
  

          
            <h4 id="Package.String" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L66">String</a> <a class="permalink" href="#Package.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/package.go#L66">❖</a><pre>func (pkg *<a href="#Package">Package</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
        
          <h3 id="PkgName" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L129">PkgName</a> <a class="permalink" href="#PkgName">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=PkgName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L129">❖</a><pre>type PkgName struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A PkgName represents an imported Go package.
</p>

          
          
          
  


          
            <h4 id="NewPkgName" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L135">NewPkgName</a> <a class="permalink" href="#NewPkgName">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewPkgName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L135">❖</a><pre>func NewPkgName(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, imported *<a href="#Package">Package</a>) *<a href="#PkgName">PkgName</a></pre></div>
            
  

          

          
            <h4 id="PkgName.Exported" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#PkgName.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *PkgName) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="PkgName.Id" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#PkgName.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *PkgName) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="PkgName.Imported" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L141">Imported</a> <a class="permalink" href="#PkgName.Imported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=PkgName%2FImported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L141">❖</a><pre>func (obj *<a href="#PkgName">PkgName</a>) Imported() *<a href="#Package">Package</a></pre></div><p>
Imported returns the package that was imported.
It is distinct from Pkg(), which is the package containing the import statement.
</p>

            
  

          
            <h4 id="PkgName.Name" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#PkgName.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *PkgName) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="PkgName.Parent" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#PkgName.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *PkgName) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="PkgName.Pkg" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#PkgName.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *PkgName) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="PkgName.Pos" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#PkgName.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *PkgName) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="PkgName.String" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L356">String</a> <a class="permalink" href="#PkgName.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=PkgName%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L356">❖</a><pre>func (obj *<a href="#PkgName">PkgName</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="PkgName.Type" data-kind="m">func (*PkgName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#PkgName.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *PkgName) Type() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Pointer" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L157">Pointer</a> <a class="permalink" href="#Pointer">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Pointer&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L157">❖</a><pre>type Pointer struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Pointer represents a pointer type.
</p>

          
          
          
  


          
            <h4 id="NewPointer" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L162">NewPointer</a> <a class="permalink" href="#NewPointer">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewPointer&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L162">❖</a><pre>func NewPointer(elem <a href="#Type">Type</a>) *<a href="#Pointer">Pointer</a></pre></div><p>
NewPointer returns a new pointer type for the given element (base) type.
</p>

            
  

          

          
            <h4 id="Pointer.Elem" data-kind="m">func (*Pointer) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L165">Elem</a> <a class="permalink" href="#Pointer.Elem">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Pointer%2FElem&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L165">❖</a><pre>func (p *<a href="#Pointer">Pointer</a>) Elem() <a href="#Type">Type</a></pre></div><p>
Elem returns the element type for the given pointer p.
</p>

            
  

          
            <h4 id="Pointer.String" data-kind="m">func (*Pointer) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L444">String</a> <a class="permalink" href="#Pointer.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Pointer%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L444">❖</a><pre>func (t *<a href="#Pointer">Pointer</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Pointer.Underlying" data-kind="m">func (*Pointer) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L432">Underlying</a> <a class="permalink" href="#Pointer.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Pointer%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L432">❖</a><pre>func (t *<a href="#Pointer">Pointer</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Qualifier" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L25">Qualifier</a> <a class="permalink" href="#Qualifier">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Qualifier&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L25">❖</a><pre>type Qualifier func(*<a href="#Package">Package</a>) <a href="/builtin#string">string</a></pre></div><p>
A Qualifier controls how named package-level objects are printed in
calls to TypeString, ObjectString, and SelectionString.
</p>
<p>
These three formatting routines call the Qualifier for each
package-level object O, and if the Qualifier returns a non-empty
string p, the object is printed in the form p.O.
If it returns an empty string, only the object name O is printed.
</p>
<p>
Using a nil Qualifier is equivalent to using (*Package).Path: the
object is qualified by the import path, e.g., &#34;encoding/json.Marshal&#34;.
</p>

          
          
          
  


          
            <h4 id="RelativeTo" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L29">RelativeTo</a> <a class="permalink" href="#RelativeTo">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=RelativeTo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/typestring.go#L29">❖</a><pre>func RelativeTo(pkg *<a href="#Package">Package</a>) <a href="#Qualifier">Qualifier</a></pre></div><p>
RelativeTo(pkg) returns a Qualifier that fully qualifies members of
all packages other than pkg.
</p>

            
  

          

          
        
          <h3 id="Scope" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L25">Scope</a> <a class="permalink" href="#Scope">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Scope&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L25">❖</a><pre>type Scope struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Scope maintains a set of objects and links to its containing
(parent) and contained (children) scopes. Objects may be inserted
and looked up by name. The zero value for Scope is a ready-to-use
empty scope.
</p>

          
          
          
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-Scope">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-Scope">Example</a></div>
        <div id="ex-Scope" class="panel-collapse collapse"><div class="panel-body">
          <p><p>
ExampleScope prints the tree of Scopes of a package created from a
set of parsed files.
</p>

          <p>Code:<span class="pull-right"><a href="?play=Scope">play</a>&nbsp;</span>
          <pre><span class="com">// Parse the source files for a package.</span>
fset := token.NewFileSet()
var files []*ast.File
for _, file := range []struct{ name, input string }{
    {&#34;main.go&#34;, `
package main
import &#34;fmt&#34;
func main() {
	freezing := FToC(-18)
	fmt.Println(freezing, Boiling) }
`},
    {&#34;celsius.go&#34;, `
package main
import &#34;fmt&#34;
type Celsius float64
func (c Celsius) String() string { return fmt.Sprintf(&#34;%g°C&#34;, c) }
func FToC(f float64) Celsius { return Celsius(f - 32 / 9 * 5) }
const Boiling Celsius = 100
`},
} {
    f, err := parser.ParseFile(fset, file.name, file.input, 0)
    if err != nil {
        log.Fatal(err)
    }
    files = append(files, f)
}

<span class="com">// Type-check a package consisting of these files.
// Type information for the imported &#34;fmt&#34; package
// comes from $GOROOT/pkg/$GOOS_$GOOARCH/fmt.a.</span>
conf := types.Config{Importer: importer.Default()}
pkg, err := conf.Check(&#34;temperature&#34;, fset, files, nil)
if err != nil {
    log.Fatal(err)
}

<span class="com">// Print the tree of scopes.
// For determinism, we redact addresses.</span>
var buf bytes.Buffer
pkg.Scope().WriteTo(&amp;buf, 0, true)
rx := regexp.MustCompile(` 0x[a-fA-F0-9]*`)
fmt.Println(rx.ReplaceAllString(buf.String(), &#34;&#34;))</pre>
          <p>Output:<pre>package &#34;temperature&#34; scope {
.  const temperature.Boiling temperature.Celsius
.  type temperature.Celsius float64
.  func temperature.FToC(f float64) temperature.Celsius
.  func temperature.main()

.  main.go scope {
.  .  package fmt

.  .  function scope {
.  .  .  var freezing temperature.Celsius
.  .  }.  }
.  celsius.go scope {
.  .  package fmt

.  .  function scope {
.  .  .  var c temperature.Celsius
.  .  }
.  .  function scope {
.  .  .  var f float64
.  .  }.  }}
</pre>
        </div></div>
      </div>
    
    </div>
  


          
            <h4 id="NewScope" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L35">NewScope</a> <a class="permalink" href="#NewScope">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewScope&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L35">❖</a><pre>func NewScope(parent *<a href="#Scope">Scope</a>, pos, end <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, comment <a href="/builtin#string">string</a>) *<a href="#Scope">Scope</a></pre></div><p>
NewScope returns a new, empty scope contained in the given parent
scope, if any. The comment is for debugging only.
</p>

            
  

          

          
            <h4 id="Scope.Child" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L66">Child</a> <a class="permalink" href="#Scope.Child">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FChild&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L66">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Child(i <a href="/builtin#int">int</a>) *<a href="#Scope">Scope</a></pre></div><p>
Child returns the i&#39;th child scope for 0 &lt;= i &lt; NumChildren().
</p>

            
  

          
            <h4 id="Scope.Contains" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L123">Contains</a> <a class="permalink" href="#Scope.Contains">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FContains&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L123">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Contains(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>) <a href="/builtin#bool">bool</a></pre></div><p>
Contains returns true if pos is within the scope&#39;s extent.
The result is guaranteed to be valid only if the type-checked
AST has complete position information.
</p>

            
  

          
            <h4 id="Scope.End" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L118">End</a> <a class="permalink" href="#Scope.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FEnd&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L118">❖</a><pre>func (s *<a href="#Scope">Scope</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Scope.Innermost" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L132">Innermost</a> <a class="permalink" href="#Scope.Innermost">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FInnermost&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L132">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Innermost(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>) *<a href="#Scope">Scope</a></pre></div><p>
Innermost returns the innermost (child) scope containing
pos. If pos is not within any scope, the result is nil.
The result is also nil for the Universe scope.
The result is guaranteed to be valid only if the type-checked
AST has complete position information.
</p>

            
  

          
            <h4 id="Scope.Insert" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L98">Insert</a> <a class="permalink" href="#Scope.Insert">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FInsert&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L98">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Insert(obj <a href="#Object">Object</a>) <a href="#Object">Object</a></pre></div><p>
Insert attempts to insert an object obj into scope s.
If s already contains an alternative object alt with
the same name, Insert leaves s unchanged and returns alt.
Otherwise it inserts obj, sets the object&#39;s parent scope
if not already set, and returns nil.
</p>

            
  

          
            <h4 id="Scope.Len" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L48">Len</a> <a class="permalink" href="#Scope.Len">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FLen&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L48">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Len() <a href="/builtin#int">int</a></pre></div><p>
Len() returns the number of scope elements.
</p>

            
  

          
            <h4 id="Scope.Lookup" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L70">Lookup</a> <a class="permalink" href="#Scope.Lookup">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FLookup&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L70">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Lookup(name <a href="/builtin#string">string</a>) <a href="#Object">Object</a></pre></div><p>
Lookup returns the object in scope s with the given name if such an
object exists; otherwise the result is nil.
</p>

            
  

          
            <h4 id="Scope.LookupParent" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L84">LookupParent</a> <a class="permalink" href="#Scope.LookupParent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FLookupParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L84">❖</a><pre>func (s *<a href="#Scope">Scope</a>) LookupParent(name <a href="/builtin#string">string</a>, pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>) (*<a href="#Scope">Scope</a>, <a href="#Object">Object</a>)</pre></div><p>
LookupParent follows the parent chain of scopes starting with s until
it finds a scope where Lookup(name) returns a non-nil object, and then
returns that scope and object. If a valid position pos is provided,
only objects that were declared at or before pos are considered.
If no such scope and object exists, the result is (nil, nil).
</p>
<p>
Note that obj.Parent() may be different from the returned scope if the
object was inserted into the scope and already had a parent at that
time (see Insert, below). This can only happen for dot-imported objects
whose scope is the scope of the package that exported them.
</p>

            
  

          
            <h4 id="Scope.Names" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L51">Names</a> <a class="permalink" href="#Scope.Names">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FNames&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L51">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Names() []<a href="/builtin#string">string</a></pre></div><p>
Names returns the scope&#39;s element names in sorted order.
</p>

            
  

          
            <h4 id="Scope.NumChildren" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L63">NumChildren</a> <a class="permalink" href="#Scope.NumChildren">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FNumChildren&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L63">❖</a><pre>func (s *<a href="#Scope">Scope</a>) NumChildren() <a href="/builtin#int">int</a></pre></div><p>
NumChildren() returns the number of scopes nested in s.
</p>

            
  

          
            <h4 id="Scope.Parent" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L45">Parent</a> <a class="permalink" href="#Scope.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L45">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Parent() *<a href="#Scope">Scope</a></pre></div><p>
Parent returns the scope&#39;s containing (parent) scope.
</p>

            
  

          
            <h4 id="Scope.Pos" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L117">Pos</a> <a class="permalink" href="#Scope.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L117">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div><p>
Pos and End describe the scope&#39;s source code extent [pos, end).
The results are guaranteed to be valid only if the type-checked
AST has complete position information. The extent is undefined
for Universe and package scopes.
</p>

            
  

          
            <h4 id="Scope.String" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L186">String</a> <a class="permalink" href="#Scope.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L186">❖</a><pre>func (s *<a href="#Scope">Scope</a>) String() <a href="/builtin#string">string</a></pre></div><p>
String returns a string representation of the scope, for debugging.
</p>

            
  

          
            <h4 id="Scope.WriteTo" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L159">WriteTo</a> <a class="permalink" href="#Scope.WriteTo">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FWriteTo&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/scope.go#L159">❖</a><pre>func (s *<a href="#Scope">Scope</a>) WriteTo(w <a href="/io">io</a>.<a href="/io#Writer">Writer</a>, n <a href="/builtin#int">int</a>, recurse <a href="/builtin#bool">bool</a>)</pre></div><p>
WriteTo writes a string representation of the scope to w,
with the scope elements sorted by name.
The level of indentation is controlled by n &gt;= 0, with
n == 0 for no indentation.
If recurse is set, it also writes nested (children) scopes.
</p>

            
  

          
        
          <h3 id="Selection" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L40">Selection</a> <a class="permalink" href="#Selection">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Selection&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L40">❖</a><pre>type Selection struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Selection describes a selector expression x.f.
For the declarations:
</p>
<pre>type T struct{ x int; E }
type E struct{}
func (e E) m() {}
var p *T
</pre>
<p>
the following relations exist:
</p>
<pre>Selector    Kind          Recv    Obj    Type               Index     Indirect

p.x         FieldVal      T       x      int                {0}       true
p.m         MethodVal     *T      m      func (e *T) m()    {1, 0}    true
T.m         MethodExpr    T       m      func m(_ T)        {1, 0}    false
</pre>

          
          
          
  


          

          
            <h4 id="Selection.Index" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L102">Index</a> <a class="permalink" href="#Selection.Index">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FIndex&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L102">❖</a><pre>func (s *<a href="#Selection">Selection</a>) Index() []<a href="/builtin#int">int</a></pre></div><p>
Index describes the path from x to f in x.f.
The last index entry is the field or method index of the type declaring f;
either:
</p>
<pre>1) the list of declared methods of a named type; or
2) the list of methods of an interface type; or
3) the list of fields of a struct type.
</pre>
<p>
The earlier index entries are the indices of the embedded fields implicitly
traversed to get from (the type of) x to f, starting at embedding depth 0.
</p>

            
  

          
            <h4 id="Selection.Indirect" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L106">Indirect</a> <a class="permalink" href="#Selection.Indirect">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FIndirect&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L106">❖</a><pre>func (s *<a href="#Selection">Selection</a>) Indirect() <a href="/builtin#bool">bool</a></pre></div><p>
Indirect reports whether any pointer indirection was required to get from
x to f in x.f.
</p>

            
  

          
            <h4 id="Selection.Kind" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L49">Kind</a> <a class="permalink" href="#Selection.Kind">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FKind&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L49">❖</a><pre>func (s *<a href="#Selection">Selection</a>) Kind() <a href="#SelectionKind">SelectionKind</a></pre></div><p>
Kind returns the selection kind.
</p>

            
  

          
            <h4 id="Selection.Obj" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L56">Obj</a> <a class="permalink" href="#Selection.Obj">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FObj&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L56">❖</a><pre>func (s *<a href="#Selection">Selection</a>) Obj() <a href="#Object">Object</a></pre></div><p>
Obj returns the object denoted by x.f; a *Var for
a field selection, and a *Func in all other cases.
</p>

            
  

          
            <h4 id="Selection.Recv" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L52">Recv</a> <a class="permalink" href="#Selection.Recv">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FRecv&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L52">❖</a><pre>func (s *<a href="#Selection">Selection</a>) Recv() <a href="#Type">Type</a></pre></div><p>
Recv returns the type of x in x.f.
</p>

            
  

          
            <h4 id="Selection.String" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L108">String</a> <a class="permalink" href="#Selection.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L108">❖</a><pre>func (s *<a href="#Selection">Selection</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Selection.Type" data-kind="m">func (*Selection) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L60">Type</a> <a class="permalink" href="#Selection.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Selection%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L60">❖</a><pre>func (s *<a href="#Selection">Selection</a>) Type() <a href="#Type">Type</a></pre></div><p>
Type returns the type of x.f, which may be different from the type of f.
See Selection for more information.
</p>

            
  

          
        
          <h3 id="SelectionKind" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L16">SelectionKind</a> <a class="permalink" href="#SelectionKind">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=SelectionKind&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L16">❖</a><pre>type SelectionKind <a href="/builtin#int">int</a></pre></div><p>
SelectionKind describes the kind of a selector expression x.f
(excluding qualified identifiers).
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/selection.go#L18">❖</a><pre>const (
    <span id="FieldVal">FieldVal</span>   <a href="#SelectionKind">SelectionKind</a> = <a href="/builtin#iota">iota</a> <span class="com">// x.f is a struct field selector</span>
    <span id="MethodVal">MethodVal</span>                       <span class="com">// x.f is a method selector</span>
    <span id="MethodExpr">MethodExpr</span>                      <span class="com">// x.f is a method expression</span>
)</pre></div>
          
          
  


          

          
        
          <h3 id="Signature" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L194">Signature</a> <a class="permalink" href="#Signature">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Signature&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L194">❖</a><pre>type Signature struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Signature represents a (non-builtin) function or method type.
</p>

          
          
          
  


          
            <h4 id="NewSignature" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L210">NewSignature</a> <a class="permalink" href="#NewSignature">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewSignature&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L210">❖</a><pre>func NewSignature(recv *<a href="#Var">Var</a>, params, results *<a href="#Tuple">Tuple</a>, variadic <a href="/builtin#bool">bool</a>) *<a href="#Signature">Signature</a></pre></div><p>
NewSignature returns a new function type for the given receiver, parameters,
and results, either of which may be nil. If variadic is set, the function
is variadic, it must have at least one parameter, and the last parameter
must be of unnamed slice type.
</p>

            
  

          

          
            <h4 id="Signature.Params" data-kind="m">func (*Signature) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L232">Params</a> <a class="permalink" href="#Signature.Params">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Signature%2FParams&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L232">❖</a><pre>func (s *<a href="#Signature">Signature</a>) Params() *<a href="#Tuple">Tuple</a></pre></div><p>
Params returns the parameters of signature s, or nil.
</p>

            
  

          
            <h4 id="Signature.Recv" data-kind="m">func (*Signature) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L229">Recv</a> <a class="permalink" href="#Signature.Recv">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Signature%2FRecv&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L229">❖</a><pre>func (s *<a href="#Signature">Signature</a>) Recv() *<a href="#Var">Var</a></pre></div><p>
Recv returns the receiver of signature s (if a method), or nil if a
function.
</p>
<p>
For an abstract method, Recv returns the enclosing interface either
as a *Named or an *Interface. Due to embedding, an interface may
contain methods whose receiver type is a different interface.
</p>

            
  

          
            <h4 id="Signature.Results" data-kind="m">func (*Signature) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L235">Results</a> <a class="permalink" href="#Signature.Results">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Signature%2FResults&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L235">❖</a><pre>func (s *<a href="#Signature">Signature</a>) Results() *<a href="#Tuple">Tuple</a></pre></div><p>
Results returns the results of signature s, or nil.
</p>

            
  

          
            <h4 id="Signature.String" data-kind="m">func (*Signature) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L446">String</a> <a class="permalink" href="#Signature.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Signature%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L446">❖</a><pre>func (t *<a href="#Signature">Signature</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Signature.Underlying" data-kind="m">func (*Signature) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L434">Underlying</a> <a class="permalink" href="#Signature.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Signature%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L434">❖</a><pre>func (t *<a href="#Signature">Signature</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
            <h4 id="Signature.Variadic" data-kind="m">func (*Signature) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L238">Variadic</a> <a class="permalink" href="#Signature.Variadic">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Signature%2FVariadic&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L238">❖</a><pre>func (s *<a href="#Signature">Signature</a>) Variadic() <a href="/builtin#bool">bool</a></pre></div><p>
Variadic reports whether the signature s is variadic.
</p>

            
  

          
        
          <h3 id="Sizes" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L10">Sizes</a> <a class="permalink" href="#Sizes">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Sizes&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L10">❖</a><pre>type Sizes interface {
    <span class="com">// Alignof returns the alignment of a variable of type T.
    // Alignof must implement the alignment guarantees required by the spec.</span>
    <span id="Sizes.Alignof">Alignof</span>(T <a href="#Type">Type</a>) <a href="/builtin#int64">int64</a>

    <span class="com">// Offsetsof returns the offsets of the given struct fields, in bytes.
    // Offsetsof must implement the offset guarantees required by the spec.</span>
    <span id="Sizes.Offsetsof">Offsetsof</span>(fields []*<a href="#Var">Var</a>) []<a href="/builtin#int64">int64</a>

    <span class="com">// Sizeof returns the size of a variable of type T.
    // Sizeof must implement the size guarantees required by the spec.</span>
    <span id="Sizes.Sizeof">Sizeof</span>(T <a href="#Type">Type</a>) <a href="/builtin#int64">int64</a>
}</pre></div><p>
Sizes defines the sizing functions for package <a href="/unsafe">unsafe</a>.
</p>

          
          
          
  


          

          
        
          <h3 id="Slice" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L109">Slice</a> <a class="permalink" href="#Slice">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Slice&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L109">❖</a><pre>type Slice struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Slice represents a slice type.
</p>

          
          
          
  


          
            <h4 id="NewSlice" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L114">NewSlice</a> <a class="permalink" href="#NewSlice">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewSlice&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L114">❖</a><pre>func NewSlice(elem <a href="#Type">Type</a>) *<a href="#Slice">Slice</a></pre></div><p>
NewSlice returns a new slice type for the given element type.
</p>

            
  

          

          
            <h4 id="Slice.Elem" data-kind="m">func (*Slice) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L117">Elem</a> <a class="permalink" href="#Slice.Elem">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Slice%2FElem&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L117">❖</a><pre>func (s *<a href="#Slice">Slice</a>) Elem() <a href="#Type">Type</a></pre></div><p>
Elem returns the element type of slice s.
</p>

            
  

          
            <h4 id="Slice.String" data-kind="m">func (*Slice) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L442">String</a> <a class="permalink" href="#Slice.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Slice%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L442">❖</a><pre>func (t *<a href="#Slice">Slice</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Slice.Underlying" data-kind="m">func (*Slice) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L430">Underlying</a> <a class="permalink" href="#Slice.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Slice%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L430">❖</a><pre>func (t *<a href="#Slice">Slice</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="StdSizes" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L43">StdSizes</a> <a class="permalink" href="#StdSizes">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=StdSizes&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L43">❖</a><pre>type StdSizes struct {
    <span id="StdSizes.WordSize">WordSize</span> <a href="/builtin#int64">int64</a> <span class="com">// word size in bytes - must be &gt;= 4 (32bits)</span>
    <span id="StdSizes.MaxAlign">MaxAlign</span> <a href="/builtin#int64">int64</a> <span class="com">// maximum alignment in bytes - must be &gt;= 1</span>
}</pre></div><p>
StdSizes is a convenience type for creating commonly used Sizes.
It makes the following simplifying assumptions:
</p>
<pre>	- The size of explicitly sized basic types (int16, etc.) is the
	  specified size.
	- The size of strings and interfaces is 2*WordSize.
	- The size of slices is 3*WordSize.
	- The size of an array of n elements corresponds to the size of
	  a struct of n consecutive fields of the array&#39;s element type.
     - The size of a struct is the offset of the last field plus that
	  field&#39;s size. As with all element types, if the struct is used
	  in an array its size must first be aligned to a multiple of the
	  struct&#39;s alignment.
	- All other types have size WordSize.
	- Arrays and structs are aligned per spec definition; all other
	  types are naturally aligned with a maximum alignment MaxAlign.
</pre>
<p>
*StdSizes implements Sizes.
</p>

          
          
          
  


          

          
            <h4 id="StdSizes.Alignof" data-kind="m">func (*StdSizes) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L48">Alignof</a> <a class="permalink" href="#StdSizes.Alignof">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StdSizes%2FAlignof&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L48">❖</a><pre>func (s *<a href="#StdSizes">StdSizes</a>) Alignof(T <a href="#Type">Type</a>) <a href="/builtin#int64">int64</a></pre></div>
            
  

          
            <h4 id="StdSizes.Offsetsof" data-kind="m">func (*StdSizes) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L92">Offsetsof</a> <a class="permalink" href="#StdSizes.Offsetsof">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StdSizes%2FOffsetsof&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L92">❖</a><pre>func (s *<a href="#StdSizes">StdSizes</a>) Offsetsof(fields []*<a href="#Var">Var</a>) []<a href="/builtin#int64">int64</a></pre></div>
            
  

          
            <h4 id="StdSizes.Sizeof" data-kind="m">func (*StdSizes) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L120">Sizeof</a> <a class="permalink" href="#StdSizes.Sizeof">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StdSizes%2FSizeof&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/sizes.go#L120">❖</a><pre>func (s *<a href="#StdSizes">StdSizes</a>) Sizeof(T <a href="#Type">Type</a>) <a href="/builtin#int64">int64</a></pre></div>
            
  

          
        
          <h3 id="Struct" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L120">Struct</a> <a class="permalink" href="#Struct">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Struct&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L120">❖</a><pre>type Struct struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Struct represents a struct type.
</p>

          
          
          
  


          
            <h4 id="NewStruct" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L129">NewStruct</a> <a class="permalink" href="#NewStruct">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewStruct&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L129">❖</a><pre>func NewStruct(fields []*<a href="#Var">Var</a>, tags []<a href="/builtin#string">string</a>) *<a href="#Struct">Struct</a></pre></div><p>
NewStruct returns a new struct with the given fields and corresponding field tags.
If a field with index i has a tag, tags[i] must be that tag, but len(tags) may be
only as long as required to hold the tag with the largest index i. Consequently,
if no field has a tag, tags may be nil.
</p>

            
  

          

          
            <h4 id="Struct.Field" data-kind="m">func (*Struct) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L146">Field</a> <a class="permalink" href="#Struct.Field">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Struct%2FField&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L146">❖</a><pre>func (s *<a href="#Struct">Struct</a>) Field(i <a href="/builtin#int">int</a>) *<a href="#Var">Var</a></pre></div><p>
Field returns the i&#39;th field for 0 &lt;= i &lt; NumFields().
</p>

            
  

          
            <h4 id="Struct.NumFields" data-kind="m">func (*Struct) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L143">NumFields</a> <a class="permalink" href="#Struct.NumFields">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Struct%2FNumFields&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L143">❖</a><pre>func (s *<a href="#Struct">Struct</a>) NumFields() <a href="/builtin#int">int</a></pre></div><p>
NumFields returns the number of fields in the struct (including blank and anonymous fields).
</p>

            
  

          
            <h4 id="Struct.String" data-kind="m">func (*Struct) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L443">String</a> <a class="permalink" href="#Struct.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Struct%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L443">❖</a><pre>func (t *<a href="#Struct">Struct</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Struct.Tag" data-kind="m">func (*Struct) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L149">Tag</a> <a class="permalink" href="#Struct.Tag">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Struct%2FTag&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L149">❖</a><pre>func (s *<a href="#Struct">Struct</a>) Tag(i <a href="/builtin#int">int</a>) <a href="/builtin#string">string</a></pre></div><p>
Tag returns the i&#39;th field tag for 0 &lt;= i &lt; NumFields().
</p>

            
  

          
            <h4 id="Struct.Underlying" data-kind="m">func (*Struct) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L431">Underlying</a> <a class="permalink" href="#Struct.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Struct%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L431">❖</a><pre>func (t *<a href="#Struct">Struct</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Tuple" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L170">Tuple</a> <a class="permalink" href="#Tuple">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Tuple&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L170">❖</a><pre>type Tuple struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Tuple represents an ordered list of variables; a nil *Tuple is a valid (empty) tuple.
Tuples are used as components of signatures and to represent the type of multiple
assignments; they are not first class types of Go.
</p>

          
          
          
  


          
            <h4 id="NewTuple" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L175">NewTuple</a> <a class="permalink" href="#NewTuple">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewTuple&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L175">❖</a><pre>func NewTuple(x ...*<a href="#Var">Var</a>) *<a href="#Tuple">Tuple</a></pre></div><p>
NewTuple returns a new tuple for the given variables.
</p>

            
  

          

          
            <h4 id="Tuple.At" data-kind="m">func (*Tuple) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L191">At</a> <a class="permalink" href="#Tuple.At">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Tuple%2FAt&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L191">❖</a><pre>func (t *<a href="#Tuple">Tuple</a>) At(i <a href="/builtin#int">int</a>) *<a href="#Var">Var</a></pre></div><p>
At returns the i&#39;th variable of tuple t.
</p>

            
  

          
            <h4 id="Tuple.Len" data-kind="m">func (*Tuple) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L183">Len</a> <a class="permalink" href="#Tuple.Len">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Tuple%2FLen&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L183">❖</a><pre>func (t *<a href="#Tuple">Tuple</a>) Len() <a href="/builtin#int">int</a></pre></div><p>
Len returns the number variables of tuple t.
</p>

            
  

          
            <h4 id="Tuple.String" data-kind="m">func (*Tuple) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L445">String</a> <a class="permalink" href="#Tuple.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Tuple%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L445">❖</a><pre>func (t *<a href="#Tuple">Tuple</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Tuple.Underlying" data-kind="m">func (*Tuple) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L433">Underlying</a> <a class="permalink" href="#Tuple.Underlying">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Tuple%2FUnderlying&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L433">❖</a><pre>func (t *<a href="#Tuple">Tuple</a>) Underlying() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Type" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L11">Type</a> <a class="permalink" href="#Type">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Type&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/type.go#L11">❖</a><pre>type Type interface {
    <span class="com">// Underlying returns the underlying type of a type.</span>
    <span id="Type.Underlying">Underlying</span>() <a href="#Type">Type</a>

    <span class="com">// String returns a string representation of a type.</span>
    <span id="Type.String">String</span>() <a href="/builtin#string">string</a>
}</pre></div><p>
A Type represents a type of Go.
All types implement the Type interface.
</p>

          
          
          
  


          
            <h4 id="Default" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L298">Default</a> <a class="permalink" href="#Default">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Default&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/predicates.go#L298">❖</a><pre>func Default(typ <a href="#Type">Type</a>) <a href="#Type">Type</a></pre></div><p>
Default returns the default &#34;typed&#34; type for an &#34;untyped&#34; type;
it returns the incoming type for all other types. The default type
for untyped nil is untyped nil.
</p>

            
  

          

          
        
          <h3 id="TypeAndValue" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L254">TypeAndValue</a> <a class="permalink" href="#TypeAndValue">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L254">❖</a><pre>type TypeAndValue struct {
    <span id="TypeAndValue.Type">Type</span>  <a href="#Type">Type</a>
    <span id="TypeAndValue.Value">Value</span> <a href="/go/constant">constant</a>.<a href="/go/constant#Value">Value</a>
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
TypeAndValue reports the type and value (for constants)
of the corresponding expression.
</p>

          
          
          
  


          
            <h4 id="Eval" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/eval.go#L37">Eval</a> <a class="permalink" href="#Eval">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Eval&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/eval.go#L37">❖</a><pre>func Eval(fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, pkg *<a href="#Package">Package</a>, pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, expr <a href="/builtin#string">string</a>) (<a href="#TypeAndValue">TypeAndValue</a>, <a href="/builtin#error">error</a>)</pre></div><p>
Eval returns the type and, if constant, the value for the
expression expr, evaluated at position pos of package pkg,
which must have been derived from type-checking an AST with
complete position information relative to the provided file
set.
</p>
<p>
If the expression contains function literals, their bodies
are ignored (i.e., the bodies are not type-checked).
</p>
<p>
If pkg == nil, the Universe scope is used and the provided
position pos is ignored. If pkg != nil, and pos is invalid,
the package scope is used. Otherwise, pos must belong to the
package.
</p>
<p>
An error is returned if pos is not within the package or
if the node cannot be evaluated.
</p>
<p>
Note: Eval should not be used instead of running Check to compute
types and values, but in addition to Check. Eval will re-evaluate
its argument each time, and it also does not know about the context
in which an expression is used (e.g., an assignment). Thus, top-
level untyped constants will return an untyped type rather then the
respective context-specific type.
</p>

            
  

          

          
            <h4 id="TypeAndValue.Addressable" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L299">Addressable</a> <a class="permalink" href="#TypeAndValue.Addressable">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FAddressable&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L299">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) Addressable() <a href="/builtin#bool">bool</a></pre></div><p>
Addressable reports whether the corresponding expression
is addressable (<a href="https://github.com/golang/go/blob/master/ref/spec#Address_operators">https://github.com/golang/go/blob/master/ref/spec#Address_operators</a>).
</p>

            
  

          
            <h4 id="TypeAndValue.Assignable" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L305">Assignable</a> <a class="permalink" href="#TypeAndValue.Assignable">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FAssignable&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L305">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) Assignable() <a href="/builtin#bool">bool</a></pre></div><p>
Assignable reports whether the corresponding expression
is assignable to (provided a value of the right type).
</p>

            
  

          
            <h4 id="TypeAndValue.HasOk" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L311">HasOk</a> <a class="permalink" href="#TypeAndValue.HasOk">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FHasOk&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L311">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) HasOk() <a href="/builtin#bool">bool</a></pre></div><p>
HasOk reports whether the corresponding expression may be
used on the lhs of a comma-ok assignment.
</p>

            
  

          
            <h4 id="TypeAndValue.IsBuiltin" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L276">IsBuiltin</a> <a class="permalink" href="#TypeAndValue.IsBuiltin">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FIsBuiltin&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L276">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) IsBuiltin() <a href="/builtin#bool">bool</a></pre></div><p>
IsBuiltin reports whether the corresponding expression denotes
a (possibly parenthesized) built-in function.
</p>

            
  

          
            <h4 id="TypeAndValue.IsNil" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L293">IsNil</a> <a class="permalink" href="#TypeAndValue.IsNil">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FIsNil&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L293">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) IsNil() <a href="/builtin#bool">bool</a></pre></div><p>
IsNil reports whether the corresponding expression denotes the
predeclared value nil.
</p>

            
  

          
            <h4 id="TypeAndValue.IsType" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L270">IsType</a> <a class="permalink" href="#TypeAndValue.IsType">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FIsType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L270">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) IsType() <a href="/builtin#bool">bool</a></pre></div><p>
IsType reports whether the corresponding expression specifies a type.
</p>

            
  

          
            <h4 id="TypeAndValue.IsValue" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L283">IsValue</a> <a class="permalink" href="#TypeAndValue.IsValue">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FIsValue&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L283">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) IsValue() <a href="/builtin#bool">bool</a></pre></div><p>
IsValue reports whether the corresponding expression is a value.
Builtins are not considered values. Constant values have a non-
nil Value.
</p>

            
  

          
            <h4 id="TypeAndValue.IsVoid" data-kind="m">func (TypeAndValue) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L265">IsVoid</a> <a class="permalink" href="#TypeAndValue.IsVoid">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAndValue%2FIsVoid&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/api.go#L265">❖</a><pre>func (tv <a href="#TypeAndValue">TypeAndValue</a>) IsVoid() <a href="/builtin#bool">bool</a></pre></div><p>
IsVoid reports whether the corresponding expression
is a function call without results.
</p>

            
  

          
        
          <h3 id="TypeName" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L158">TypeName</a> <a class="permalink" href="#TypeName">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=TypeName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L158">❖</a><pre>type TypeName struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A TypeName represents a declared type.
</p>

          
          
          
  


          
            <h4 id="NewTypeName" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L162">NewTypeName</a> <a class="permalink" href="#NewTypeName">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewTypeName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L162">❖</a><pre>func NewTypeName(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, typ <a href="#Type">Type</a>) *<a href="#TypeName">TypeName</a></pre></div>
            
  

          

          
            <h4 id="TypeName.Exported" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#TypeName.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *TypeName) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="TypeName.Id" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#TypeName.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *TypeName) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="TypeName.Name" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#TypeName.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *TypeName) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="TypeName.Parent" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#TypeName.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *TypeName) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="TypeName.Pkg" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#TypeName.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *TypeName) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="TypeName.Pos" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#TypeName.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *TypeName) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="TypeName.String" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L358">String</a> <a class="permalink" href="#TypeName.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeName%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L358">❖</a><pre>func (obj *<a href="#TypeName">TypeName</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="TypeName.Type" data-kind="m">func (*TypeName) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#TypeName.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *TypeName) Type() <a href="#Type">Type</a></pre></div>
            
  

          
        
          <h3 id="Var" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L167">Var</a> <a class="permalink" href="#Var">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Var&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L167">❖</a><pre>type Var struct {
    <span class="com">// contains filtered or unexported fields</span>
}</pre></div><p>
A Variable represents a declared variable (including function parameters and results, and struct fields).
</p>

          
          
          
  


          
            <h4 id="NewField" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L183">NewField</a> <a class="permalink" href="#NewField">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewField&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L183">❖</a><pre>func NewField(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, typ <a href="#Type">Type</a>, anonymous <a href="/builtin#bool">bool</a>) *<a href="#Var">Var</a></pre></div>
            
  

          
            <h4 id="NewParam" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L179">NewParam</a> <a class="permalink" href="#NewParam">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewParam&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L179">❖</a><pre>func NewParam(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, typ <a href="#Type">Type</a>) *<a href="#Var">Var</a></pre></div>
            
  

          
            <h4 id="NewVar" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L175">NewVar</a> <a class="permalink" href="#NewVar">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewVar&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L175">❖</a><pre>func NewVar(pos <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>, pkg *<a href="#Package">Package</a>, name <a href="/builtin#string">string</a>, typ <a href="#Type">Type</a>) *<a href="#Var">Var</a></pre></div>
            
  

          

          
            <h4 id="Var.Anonymous" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L187">Anonymous</a> <a class="permalink" href="#Var.Anonymous">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Var%2FAnonymous&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L187">❖</a><pre>func (obj *<a href="#Var">Var</a>) Anonymous() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Var.Exported" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">Exported</a> <a class="permalink" href="#Var.Exported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FExported&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L96">❖</a><pre>func (obj *Var) Exported() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Var.Id" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">Id</a> <a class="permalink" href="#Var.Id">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FId&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L97">❖</a><pre>func (obj *Var) Id() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Var.IsField" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L188">IsField</a> <a class="permalink" href="#Var.IsField">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Var%2FIsField&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L188">❖</a><pre>func (obj *<a href="#Var">Var</a>) IsField() <a href="/builtin#bool">bool</a></pre></div>
            
  

          
            <h4 id="Var.Name" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">Name</a> <a class="permalink" href="#Var.Name">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FName&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L94">❖</a><pre>func (obj *Var) Name() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Var.Parent" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">Parent</a> <a class="permalink" href="#Var.Parent">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FParent&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L91">❖</a><pre>func (obj *Var) Parent() *<a href="#Scope">Scope</a></pre></div>
            
  

          
            <h4 id="Var.Pkg" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">Pkg</a> <a class="permalink" href="#Var.Pkg">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPkg&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L93">❖</a><pre>func (obj *Var) Pkg() *<a href="#Package">Package</a></pre></div>
            
  

          
            <h4 id="Var.Pos" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">Pos</a> <a class="permalink" href="#Var.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FPos&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L92">❖</a><pre>func (obj *Var) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Var.String" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L359">String</a> <a class="permalink" href="#Var.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Var%2FString&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L359">❖</a><pre>func (obj *<a href="#Var">Var</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="Var.Type" data-kind="m">func (*Var) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">Type</a> <a class="permalink" href="#Var.Type">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=object%2FType&amp;pkg=go%2Ftypes&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/types/object.go#L95">❖</a><pre>func (obj *Var) Type() <a href="#Type">Type</a></pre></div>
            
<div id="x-footer" class="clearfix">
  <div class="container">
    <a href="http://studygolang.com/" target="_blank">Go语言中文网</a>
    <span class="text-muted">|</span> <a href="http://golang.org/" target="_blank">Go Language</a>
    <span class="pull-right"><a href="#">Back to top</a></span>
  </div>
</div>
<script src="../assets/jquery-2.0.3.min.js"></script>
<script src="../assets/bootstrap.min.js"></script>
<script src="../assets/site.js"></script>
</body>
</html>
